RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.
解决:
https://oldpan.me/archives/pytorch-retain_graph-work
RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.
解决:
https://oldpan.me/archives/pytorch-retain_graph-work