提交 4a0e04dc authored 作者: Seon-Wook Park's avatar Seon-Wook Park

Simplify data_var decl in CompressTester

上级 b17f1d0d
...@@ -369,7 +369,7 @@ class CompressTester(utt.InferShapeTester): ...@@ -369,7 +369,7 @@ class CompressTester(utt.InferShapeTester):
for axis, cond, shape in zip(self.axis_list, self.cond_list, self.shape_list): for axis, cond, shape in zip(self.axis_list, self.cond_list, self.shape_list):
cond_var = theano.tensor.ivector() cond_var = theano.tensor.ivector()
data = numpy.random.random(size=shape).astype(theano.config.floatX) data = numpy.random.random(size=shape).astype(theano.config.floatX)
data_var = tensor.TensorType(theano.config.floatX, [False]*2)() data_var = theano.tensor.matrix()
f = theano.function([cond_var, data_var], self.op(cond_var, data_var, axis=axis)) f = theano.function([cond_var, data_var], self.op(cond_var, data_var, axis=axis))
...@@ -383,7 +383,7 @@ class CompressTester(utt.InferShapeTester): ...@@ -383,7 +383,7 @@ class CompressTester(utt.InferShapeTester):
for axis, cond, shape in zip(self.axis_list, self.cond_list, self.shape_list): for axis, cond, shape in zip(self.axis_list, self.cond_list, self.shape_list):
cond_var = theano.tensor.ivector() cond_var = theano.tensor.ivector()
data = numpy.random.random(size=shape).astype(theano.config.floatX) data = numpy.random.random(size=shape).astype(theano.config.floatX)
data_var = tensor.TensorType(theano.config.floatX, [False]*2)() data_var = theano.tensor.matrix()
self._compile_and_check([cond_var, data_var], self._compile_and_check([cond_var, data_var],
[self.op(cond_var, data_var, axis=axis)], [self.op(cond_var, data_var, axis=axis)],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论