提交 18930408 authored 作者: Frederic's avatar Frederic

remove not used var.

上级 ec81225c
......@@ -467,7 +467,6 @@ class test_Prod(unittest.TestCase):
# (and special cases: 1 zero in the row, more than 1 zero in the row)
x_val = numpy.asarray([[1, 2, 3], [4, 5, 6], [7, 8, 9]],
dtype='float32')
x = theano.tensor.dmatrix()
# now with verify_grad
unittest_tools.verify_grad(Prod(axis=1), [x_val], mode=self.mode)
......@@ -672,7 +671,7 @@ class T_sum_dtype(unittest.TestCase):
if "complex" in input_dtype:
continue
# Check that we can take the gradient
grad_var = tensor.grad(sum_var.sum(), x,
tensor.grad(sum_var.sum(), x,
disconnected_inputs='ignore')
idx += 1
......@@ -707,7 +706,7 @@ class T_sum_dtype(unittest.TestCase):
if "complex" in input_dtype:
continue
# Check that we can take the gradient
grad_var = tensor.grad(sum_var.sum(), x,
tensor.grad(sum_var.sum(), x,
disconnected_inputs='ignore')
else:
self.assertRaises(TypeError,
......@@ -766,7 +765,7 @@ class T_mean_dtype(unittest.TestCase):
if "complex" in mean_var.dtype:
continue
try:
grad_var = tensor.grad(mean_var.sum(), x,
tensor.grad(mean_var.sum(), x,
disconnected_inputs='ignore')
except NotImplementedError:
# TrueDiv does not seem to have a gradient when
......@@ -843,7 +842,7 @@ class T_prod_dtype(unittest.TestCase):
if "complex" in output_dtype or "complex" in input_dtype:
continue
# Check that we can take the gradient
grad_var = tensor.grad(prod_var.sum(), x,
tensor.grad(prod_var.sum(), x,
disconnected_inputs='ignore')
idx += 1
......@@ -871,7 +870,7 @@ class T_prod_dtype(unittest.TestCase):
if "complex" in acc_dtype:
continue
# Check that we can take the gradient
grad_var = tensor.grad(prod_var.sum(), x,
tensor.grad(prod_var.sum(), x,
disconnected_inputs='ignore')
else:
self.assertRaises(TypeError,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论