提交 a69d1158 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix test following the addition of deepcopy.

上级 ccfd8fc6
...@@ -1615,8 +1615,9 @@ class test_shapeoptimizer(unittest.TestCase): ...@@ -1615,8 +1615,9 @@ class test_shapeoptimizer(unittest.TestCase):
v = T.vector() v = T.vector()
m = T.matrix() m = T.matrix()
f = function([v,m], v.dimshuffle('x','x',0).shape[1], mode=mode) f = function([v,m], v.dimshuffle('x','x',0).shape[1], mode=mode)
print f.maker.env.toposort() topo = f.maker.env.toposort()
assert [] == f.maker.env.toposort() assert len(topo) == 1
assert topo[0].op == theano.compile.function_module.deep_copy_op
def test_local_track_shape_i(self): def test_local_track_shape_i(self):
class IdentityNoShape(gof.Op): class IdentityNoShape(gof.Op):
...@@ -2513,7 +2514,7 @@ class T_local_sum(unittest.TestCase): ...@@ -2513,7 +2514,7 @@ class T_local_sum(unittest.TestCase):
input=numpy.asarray(numpy.arange(2*3*4).reshape(2,3,4),dtype='float64') input=numpy.asarray(numpy.arange(2*3*4).reshape(2,3,4),dtype='float64')
mode = self.mode.including('specialize').excluding('fusion') mode = self.mode.including('specialize').excluding('fusion')
for t_like,n_like,nb_nodes in [(tensor.zeros_like,numpy.zeros_like,(0,3,3,2)), for t_like,n_like,nb_nodes in [(tensor.zeros_like,numpy.zeros_like,(1,3,3,2)),
(tensor.ones_like,numpy.ones_like,(5,5,5,6))]: (tensor.ones_like,numpy.ones_like,(5,5,5,6))]:
f = theano.function([a],t_like(a).sum(None),mode=mode) f = theano.function([a],t_like(a).sum(None),mode=mode)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论