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

Do not call as_tensor_variable on other Theano variable.

上级 f1fa6737
...@@ -638,8 +638,11 @@ def get_test_value(v): ...@@ -638,8 +638,11 @@ def get_test_value(v):
For a Shared variable, it is the internal value. For a Shared variable, it is the internal value.
For another Variable, it is the content of v.tag.test_value. For another Variable, it is the content of v.tag.test_value.
""" """
v_tensor = theano.tensor.as_tensor_variable(v) if not isinstance(v, graph.Variable):
return PureOp._get_test_value(v_tensor) v_var = theano.tensor.as_tensor_variable(v)
else:
v_var = v
return PureOp._get_test_value(v_var)
def missing_test_message(msg): def missing_test_message(msg):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论