未验证 提交 39cf4a2e 编写于 作者: S songyouwei 提交者: GitHub

ptb_lm bug fix (#4448)

test=develop
上级 04b036cd
......@@ -394,8 +394,8 @@ def train_ptb_lm():
dy_loss, last_hidden, last_cell = ptb_model(x, y, init_hidden,
init_cell)
init_hidden = last_hidden
init_cell = last_cell
init_hidden = last_hidden.detach()
init_cell = last_cell.detach()
out_loss = dy_loss.numpy()
dy_loss.backward()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册