提交 502c541a authored 作者: Frederic Bastien's avatar Frederic Bastien

added another level of sloppy comparaison.

上级 108428b7
...@@ -217,10 +217,17 @@ def _wrap_tensor_into_member(x): ...@@ -217,10 +217,17 @@ def _wrap_tensor_into_member(x):
return compile.module.Member(constant(x)) return compile.module.Member(constant(x))
compile.module.register_wrapper(_obj_is_wrappable_as_tensor, _wrap_tensor_into_member) compile.module.register_wrapper(_obj_is_wrappable_as_tensor, _wrap_tensor_into_member)
if int(config.THEANO_CMP_SLOPPY): if int(config.THEANO_CMP_SLOPPY)>1:
# This environment variable is a quick-and-dirty way to get low-precision comparisons. # This environment variable is a quick-and-dirty way to get low-precision comparisons.
# For a more precise setting of these tolerances set them explicitly in your user code by # For a more precise setting of these tolerances set them explicitly in your user code by
# assigning, for example, "theano.tensor.basic.float32_atol = ..." # assigning, for example, "theano.tensor.basic.float32_atol = ..."
#when THEANO_CMP_SLOPPY>1 we are even more sloppy. This is usefull to test the gpu as they don't use extended precision and this cause some difference bigger then the normal sloppy.
float32_atol = 5e-4
float32_rtol = 1e-3
float64_rtol = 1e-4
float64_atol = 1e-3
elif int(config.THEANO_CMP_SLOPPY):
float32_atol = 1e-4 float32_atol = 1e-4
float32_rtol = 1e-3 float32_rtol = 1e-3
float64_rtol = 1e-4 float64_rtol = 1e-4
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论