def setUp(self):
self.test_vals = [numpy.array(x, dtype=config.floatX) for x in [
0,
1,
numpy.nan,
numpy.inf,
-numpy.inf,
[numpy.nan, numpy.inf, -numpy.inf, 0, 1, -1],
]]
self.scalar = tensor.scalar()
self.vector = tensor.vector()
self.mode = get_default_mode()
if isinstance(self.mode, theano.compile.debugmode.DebugMode):
# Disable the check preventing usage of NaN / Inf values.
self.mode = copy(self.mode)
self.mode.check_isfinite = False
评论列表
文章目录