未验证 提交 bc460692 编写于 作者: L liu zhengxi 提交者: GitHub

fix dynamic decode imperative (#28160)

上级 2d45d9a0
...@@ -1395,7 +1395,7 @@ def _dynamic_decode_imperative(decoder, ...@@ -1395,7 +1395,7 @@ def _dynamic_decode_imperative(decoder,
control_flow.increment(x=step_idx_tensor, value=1.0, in_place=True) control_flow.increment(x=step_idx_tensor, value=1.0, in_place=True)
step_idx += 1 step_idx += 1
control_flow.logical_not(nn.reduce_all(finished), cond) cond = control_flow.logical_not(nn.reduce_all(finished))
if max_step_num is not None and step_idx > max_step_num: if max_step_num is not None and step_idx > max_step_num:
break break
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册