Hey, so the problem is that I only take a part of the net_outcome_values. So when I want to take another batch of that tensor pytorch already backpropagated through that and the error is thrown. I solved the problem by calculating each v and the net_probs directly there and dont save them earlier in my program.
Still, the question remains: If I have a problem where I need to save the network outputs earlier and want to sample them in batches, is my only option to use retain_graph=True ? Is there even such a use case?
I tried retain_graph=True but the time stacked up so fast to a point where it was not possible to use this method.
Thanks for your answer though, really appreciate it!