提交 8a52394d authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #1705 from nouiz/fix_tests

Fix tests errors in buildbot
...@@ -670,8 +670,10 @@ def local_gpu_careduce(node): ...@@ -670,8 +670,10 @@ def local_gpu_careduce(node):
if unreshaped_reduce.type == node.outputs[0].type: if unreshaped_reduce.type == node.outputs[0].type:
return [unreshaped_reduce] return [unreshaped_reduce]
else: else:
print >> sys.stderr, \ print >> sys.stderr, (
"WARNING: local_gpu_careduce got type wrong" "WARNING: local_gpu_careduce got type wrong",
unreshaped_reduce.type, node.outputs[0].type,
node)
return None return None
return False return False
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论