Hi,
If you break the graph, you won’t be able to use the autograd I’m afraid.
The only way to is to wrap these ops that break the graph in a custom autograd.Function and write the backward for that op yourself: https://pytorch.org/docs/stable/notes/extending.html 7