提交 db26bcf0 authored 作者: James Bergstra's avatar James Bergstra

Replaced Shape_i with shape_i in Subtensor.infer_shape

上级 6b9cca50
......@@ -2178,6 +2178,7 @@ class Subtensor(Op):
outshp = []
padded = self.idx_list + [slice(None, None, None)] * (len(xshp) - len(self.idx_list))
i = 0
shape_i = node.env.shape_feature.shape_i
for idx, xl in zip(padded, xshp):
if isinstance(idx, slice):
# If it is the default (None, None, None) slice, or a variant,
......@@ -2188,7 +2189,7 @@ class Subtensor(Op):
outshp.append(xl)
else:
#No easy way to compute the shape
outshp.append(Shape_i(i)(node.outputs[0]))
outshp.append(shape_i(i)(node.outputs[0]))
i += 1
else:
# That dimension is dropped
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论