提交 9fcdcdba authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Use op instances instead of op classes for test classes.

上级 7fd59ec5
......@@ -945,14 +945,14 @@ class TestAlloc(theano.tensor.tests.test_basic.TestAlloc):
dtype = "float32"
mode = mode_with_gpu
shared = staticmethod(cuda.shared_constructor)
allocs = [B.GpuAlloc, B.GpuAlloc, tensor.Alloc]
allocs = [B.GpuAlloc(), B.GpuAlloc(), tensor.Alloc()]
class T_Join_and_Split(theano.tensor.tests.test_basic.T_Join_and_Split):
def setUp(self):
utt.seed_rng()
self.mode = mode_with_gpu.excluding('constant_folding')
self.join_op = cuda.GpuJoin
self.join_op = cuda.GpuJoin()
# No gpu split.
self.split_op = tensor.Split
# No Make vector on the gpu, Join used instead
......
......@@ -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():
......@@ -363,7 +363,7 @@ class G_Join_and_Split(test_basic.T_Join_and_Split):
def setUp(self):
super(G_Join_and_Split, self).setUp()
self.mode = mode_with_gpu.excluding('constant_folding')
self.join_op = GpuJoin
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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论