I was changing my model and encountered a  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, but the error message is not very useful.
I have a normal training-loop and don’t use LSTMs or something, so this should not happen.
is there any way to find out which part of the model was responsible?