Skip to content

求助:在执行 loss.backwad() 时发生 RuntimeError, #194

Answered by fangwei123456
Maninnlack asked this question in Q&A
Discussion options

You must be logged in to vote

optimizer.step()后加入reset,因为SJ框架把状态存在网络内部,下一批数据计算时需要清除之前的状态:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Maninnlack
Comment options

Answer selected by fangwei123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants