提交 0a626acf authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix small errors following review and make make_vector_op an instance too.

上级 6a936ae7
......@@ -956,7 +956,7 @@ class T_Join_and_Split(theano.tensor.tests.test_basic.T_Join_and_Split):
# No gpu split.
self.split_op = tensor.Split
# No Make vector on the gpu, Join used instead
self.make_vector_op = cuda.GpuJoin
self.make_vector_op = cuda.GpuJoin()
self.floatX = "float32"
# In FAST_COMPILE mode, we force the FAST_RUN mode for optimization.
self.hide_error = theano.config.mode not in ['DebugMode', 'DEBUG_MODE']
......
......@@ -305,7 +305,7 @@ class TestAlloc(theano.tensor.tests.test_basic.TestAlloc):
dtype = "float32"
mode = mode_with_gpu
shared = staticmethod(gpuarray_shared_constructor)
allocs = [GpuAlloc(), GpuAlloc(), T.Alloc]
allocs = [GpuAlloc(), GpuAlloc(), T.Alloc()]
def test_shape():
......@@ -366,7 +366,7 @@ class G_Join_and_Split(test_basic.T_Join_and_Split):
self.join_op = GpuJoin()
self.split_op = GpuSplit
# Use join instead of MakeVector since there is no MakeVector on GPU
self.make_vector_op = GpuJoin
self.make_vector_op = GpuJoin()
# this is to avoid errors with limited devices
self.floatX = 'float32'
self.hide_error = theano.config.mode not in ['DebugMode', 'DEBUG_MODE']
......
......@@ -3194,7 +3194,7 @@ class T_Join_and_Split(unittest.TestCase):
)
self.join_op = Join()
self.split_op = Split
self.make_vector_op = opt.MakeVector
self.make_vector_op = opt.MakeVector()
self.floatX = config.floatX
self.hide_error = theano.config.mode not in ['DebugMode',
'DEBUG_MODE',
......@@ -3217,7 +3217,8 @@ class T_Join_and_Split(unittest.TestCase):
make_vector_op = self.make_vector_op
f = theano.function([], outputs, self.mode)
topo = f.maker.fgraph.toposort()
assert [True for node in topo if isinstance(node.op, make_vector_op)]
assert [True for node in topo
if isinstance(node.op, type(make_vector_op))]
variables = f()
if isinstance(variables, (tuple, list)) and len(variables) == 1:
return variables[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论