未验证 提交 d8839292 编写于 作者: J Jiangxinz 提交者: GitHub

Fix Bug of Used before Assignment (#34090)

* fix used before assign

* fix used before assign
上级 0cd21fac
......@@ -68,13 +68,14 @@ def lstm_np(input,
return new_hidden, new_cell
mask = None
if batch_first:
input = np.tranpose(input, [1, 0, 2])
if mask is not None:
mask = np.transpose(mask, [1, 0])
batch_size = input.shape[1]
mask = None
if sequence_length is not None:
max_seq_len = input.shape[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册