Pytorch中Trying to backward through the graph a second time错误解决方案
一、项目代码运行过程中完整的错误如下:
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