提交 6c4738d6 authored 作者: Frederic's avatar Frederic 提交者: Arnaud Bergeron

Make NanGuardMode not raise an error with theano.sandbox.rng_mrg.GPU_mrg_uniform

上级 fdbe417b
......@@ -179,7 +179,10 @@ class NanGuardMode(Mode):
if nan_is_error:
err = False
if cuda.cuda_available and isinstance(var, cuda.CudaNdarray):
err = np.isnan(self.gpumin(var.reshape(var.size)))
if not isinstance(nd.op,
# It store ints in float container
theano.sandbox.rng_mrg.GPU_mrg_uniform):
err = np.isnan(self.gpumin(var.reshape(var.size)))
else:
err = contains_nan(var)
if err:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论