提交 591fd120 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix the bug in specify_shape (which derives from that, yes).

上级 8b7ae921
......@@ -591,7 +591,7 @@ def get_scalar_constant_value(v):
return ret[0][0]
if isinstance(v.owner.op, theano.tensor.subtensor.Subtensor) and v.ndim == 0:
if isinstance(v.owner.inputs[0], TensorConstant):
cdata = v.owner.op.get_constant_idx(v.owner.inputs)
cdata = tuple(v.owner.op.get_constant_idx(v.owner.inputs))
try:
return v.owner.inputs[0].data.__getitem__(cdata)
except IndexError:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论