提交 73005085 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

merge during rebase

上级 434dd96e
...@@ -25,7 +25,7 @@ from theano.compile.pfunc import rebuild_collect_shared ...@@ -25,7 +25,7 @@ from theano.compile.pfunc import rebuild_collect_shared
from theano import gof from theano import gof
from theano import tensor, scalar from theano import tensor, scalar
from theano.gof.python25 import all, OrderedDict from theano.gof.python25 import all, OrderedDict
from theano.tensor.basic import get_constant_value from theano.tensor.basic import get_scalar_constant_value
################ Utility Functions and Classes ####################### ################ Utility Functions and Classes #######################
...@@ -308,7 +308,7 @@ def isNaN_or_Inf_or_None(x): ...@@ -308,7 +308,7 @@ def isNaN_or_Inf_or_None(x):
isStr = False isStr = False
if not isNaN and not isInf: if not isNaN and not isInf:
try: try:
val = get_constant_value(x) val = get_scalar_constant_value(x)
isInf = numpy.isinf(val) isInf = numpy.isinf(val)
isNaN = numpy.isnan(val) isNaN = numpy.isnan(val)
except Exception: except Exception:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论