提交 0b3c01b5 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

check if shape feature is available + comments

上级 ffcdf4d7
...@@ -1366,9 +1366,14 @@ def scan_merge_inouts(node): ...@@ -1366,9 +1366,14 @@ def scan_merge_inouts(node):
shapes = [] shapes = []
for x in na.outer_in_nit_sot: for x in na.outer_in_nit_sot:
if x.ndim > 0: if x.ndim > 0:
shapes.append( if hasattr(node.fgraph, 'shape_feature'):
node.fgraph.shape_feature.shape_of[x][0]) shapes.append(
node.fgraph.shape_feature.shape_of[x][0])
else:
shapes.append(x.shape[0])
else: else:
# If x is a scalar, than it means its value is the number of
# items scan is suppose to store for this nit_sot sequence
shapes.append(x) shapes.append(x)
tmp = [map_nitsot_out(i, o, sh, seen) tmp = [map_nitsot_out(i, o, sh, seen)
for i, o, sh in zip(na.inner_out_nit_sot, for i, o, sh in zip(na.inner_out_nit_sot,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论