提交 66c88041 authored 作者: Frederic's avatar Frederic

Fix tests errors (float32, useless error from DebugMode(the inf is removed by an opt, faster tests)

上级 640b1f52
...@@ -693,14 +693,20 @@ class T_examples(unittest.TestCase): ...@@ -693,14 +693,20 @@ class T_examples(unittest.TestCase):
N = 400 N = 400
feats = 784 feats = 784
D = (rng.randn(N, feats), rng.randint(size=N, low=0, high=2)) D = (rng.randn(N, feats).astype(config.floatX),
rng.randint(size=N, low=0, high=2).astype(config.floatX))
training_steps = 10000 training_steps = 10000
if config.mode in ["DebugMode", "DEBUG_MODE", "FAST_COMPILE"]:
training_steps = 10
# Declare Theano symbolic variables # Declare Theano symbolic variables
x = T.matrix("x") x = T.matrix("x")
y = T.vector("y") y = T.vector("y")
w = theano.shared(rng.randn(feats), name="w") # The *.03 have been added to have DebugMode don't complain
b = theano.shared(0., name="b") w = theano.shared(rng.randn(feats).astype(config.floatX) * .03,
name="w")
b = theano.shared(numpy.asarray(0., dtype=config.floatX),
name="b")
print "Initial model:" print "Initial model:"
print w.get_value(), b.get_value() print w.get_value(), b.get_value()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论