提交 1adc58cb authored 作者: ChienliMa's avatar ChienliMa

ind.step should be generix_None when it equals 1

上级 3da39dec
......@@ -1223,7 +1223,7 @@ class GetItem2d(gof.op.Op):
# If start or stop or step are None, make them a Generic
# constant. Else, they should be converted to Tensor Variables
# of dimension 1 and int/uint dtype.
if ind.step is None:
if ind.step is None or ind.step == 1:
step = generic_None
else:
if not isinstance(step, gof.Variable):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论