728x90
RuntimeError: Trying to backward through the graph a second time
-
RuntimeError: Trying to backward through the graph a second time검색하기 귀찮아서 블로그에 박제 2024. 1. 15. 15:36
RuntimeError: Trying to backward through the graph a second time (or directly access saved tensors after they have already been freed). Saved intermediate values of the graph are freed when you call .backward() or autograd.grad(). Specify retain_graph=True if you need to backward through the graph a second time or if you need to access saved tensors after calling backward. 라는 에러가 발생. 원인 : backwa..