提交 6e4863b1 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

merge

...@@ -103,7 +103,7 @@ class Scalar(Type): ...@@ -103,7 +103,7 @@ class Scalar(Type):
raise TypeError("Could not convert %s (value=%s) to %s" % (type(data), data, self.dtype), e) raise TypeError("Could not convert %s (value=%s) to %s" % (type(data), data, self.dtype), e)
def values_eq_approx(self, a, b, tolerance = 1e-4): def values_eq_approx(self, a, b, tolerance = 1e-4):
return abs(a - b) / (a+b) < tolerance return abs(a - b) <= ((abs(a)+abs(b)) * tolerance)
def c_headers(self): def c_headers(self):
l=['<math.h>'] l=['<math.h>']
......
...@@ -2787,11 +2787,6 @@ def test_local_tensor_scalar_tensor(): ...@@ -2787,11 +2787,6 @@ def test_local_tensor_scalar_tensor():
assert len(cast_nodes) == 0 assert len(cast_nodes) == 0
f(0) f(0)
@dec.knownfailureif(
isinstance(theano.compile.mode.get_default_mode(),
theano.compile.debugmode.DebugMode),
("This test fails in DEBUG_MODE, but the generated code is OK. "
"It is actually a problem of DEBUG_MODE, see #624."))
def test_local_scalar_tensor_scalar(): def test_local_scalar_tensor_scalar():
dtypes = ['int8', 'int16', 'int32', 'int64', dtypes = ['int8', 'int16', 'int32', 'int64',
'uint8', 'uint16', 'uint32', 'uint64', 'uint8', 'uint16', 'uint32', 'uint64',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论