Great! That solves my memory issue, no more leaks. Thanks a lot!
I will be able to perform more tests and try to optimize the code.
Just a question, is it an anticipated behaviour of PyTorch? It would seem logical to me that using register_buffer should forbid such tracking. Is there a better way to initialize running_mean?
Thanks again!
SMP