提交 0a63677a authored 作者: Frederic Bastien's avatar Frederic Bastien

fix scan opt when the ShapeOpt is disabled.

上级 89bad99d
......@@ -374,7 +374,10 @@ class ScanSaveMem(gof.Optimizer):
else:
return tensor.as_tensor_variable(x)
shape_of = node.env.shape_feature.shape_of
if hasattr(env, 'shape_feature'):
shape_of = node.env.shape_feature.shape_of
else:
shape_of = {}
# 1. Initialization of variables
# Note 1) We do not actually care about outputs representing shared
# variables (those have no intermediate values) so it is safer to
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论