Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to backward through the graph a second time, but the saved intermediate results have already been freed. Specify retain_graph=True when calling backward the first time. #15

Open
hkyoo52 opened this issue Mar 4, 2022 · 0 comments

Comments

@hkyoo52
Copy link
Contributor

hkyoo52 commented Mar 4, 2022

동일 혹은 일부의 loss 값에 loss.backward를 반복했다.
model 내에 y=nn.Lineard(concat(y1,y2)) 이런게 있을 때 y1과 y 둘다 loss.backward() 주면 안된다.
(y1만 loss.backward() 사용)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant