提交 146fbae8 authored 作者: carriepl's avatar carriepl

Merge pull request #3570 from nouiz/extra_scan

Fix extra scan due to old information in infer shape.
...@@ -969,10 +969,10 @@ class ShapeFeature(object): ...@@ -969,10 +969,10 @@ class ShapeFeature(object):
r.owner.inputs[0] not in var.fgraph.variables): r.owner.inputs[0] not in var.fgraph.variables):
assert var.owner assert var.owner
node = var.owner node = var.owner
# TODO recur on inputs # recur on inputs
# Need to time this to don't have it too slow. for i in node.inputs:
# Make sure to handle the case of (shape_i(x)+1) if getattr(i, 'ndim', None) > 0:
# see https://github.com/Theano/Theano/issues/3560 self.get_shape(i, 0)
o_shapes = self.get_node_infer_shape(node) o_shapes = self.get_node_infer_shape(node)
assert len(o_shapes) == len(node.outputs) assert len(o_shapes) == len(node.outputs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论