提交 94dc4a91 authored 作者: David Warde-Farley's avatar David Warde-Farley 提交者: Arnaud Bergeron

Fix errors uncovered by buildbot.

上级 bc1392a3
......@@ -231,7 +231,7 @@ def test_careduce():
pat = tensor_pattern_to_gpu_pattern(shape, pattern)
a = tensor.TensorType('float32', (False,) * len(shape))()
dim_pattern = range(len(shape))
dim_pattern = list(range(len(shape)))
dim_pattern[0] = 1
dim_pattern[1] = 0
a = a.dimshuffle(dim_pattern)
......@@ -421,7 +421,8 @@ def test_elemwise0():
f = pfunc([b], [], updates=[(a, a + b)], mode=mode_with_gpu)
# check that we work inplace.
assert f.maker.fgraph.toposort()[1].op.destroy_map.items() == [(0, [0])]
assert (list(f.maker.fgraph.toposort()[1].op.destroy_map.items())
== [(0, [0])])
a0 = a.get_value() * 1.0
f(numpy.ones((4, 4), dtype='float32'))
......
......@@ -4580,7 +4580,7 @@ class T_Scan_Cuda(unittest.TestCase, ScanGpuTests):
# graph, detect the inconsistencies and raise a TypeError
folder = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(folder, "inconsistent_scan.pkl")
assert_raises(TypeError, cPickle.load, open(path, "r"))
assert_raises(TypeError, pickle.load, open(path, "r"))
def test_consistent_inner_fct(self):
# Test that scan does not falsely detect inconsistencies in a valid
......@@ -4589,7 +4589,7 @@ class T_Scan_Cuda(unittest.TestCase, ScanGpuTests):
rs = theano.sandbox.rng_mrg.MRG_RandomStreams(use_cuda=True)
output, _ = theano.scan(lambda : rs.uniform((3,), dtype="float32"),
n_steps=3)
cPickle.loads(cPickle.dumps(output))
pickle.loads(pickle.dumps(output))
# Also ensure that, after compilation, the Scan has been moved
# on the gpu
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论