提交 71564b53 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fix function (look at type for dtype)

上级 482508a3
...@@ -389,7 +389,7 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None): ...@@ -389,7 +389,7 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None):
elif (isinstance(dx, tensor.Constant) and elif (isinstance(dx, tensor.Constant) and
isinstance(dy, tensor.Constant)): isinstance(dy, tensor.Constant)):
if not (numpy.all(dx.data == dy.data) and if not (numpy.all(dx.data == dy.data) and
dx.dtype == dy.dtype and dx.type.dtype == dy.type.dtype and
dx.data.shape == dy.data.shape): dx.data.shape == dy.data.shape):
return False return False
else: else:
...@@ -413,7 +413,7 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None): ...@@ -413,7 +413,7 @@ def equal_computations(xs, ys, in_xs=None, in_ys=None):
if (isinstance(dx, tensor.Constant) and if (isinstance(dx, tensor.Constant) and
isinstance(dy, tensor.Constant)): isinstance(dy, tensor.Constant)):
if not (numpy.all(dx.data == dy.data) and if not (numpy.all(dx.data == dy.data) and
dx.dtype == dy.dtype and dx.type.dtype == dy.type.dtype and
dx.data.shape == dy.data.shape): dx.data.shape == dy.data.shape):
return False return False
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论