Hi @mrshenli,
Yes, I just tested my code with the PyTorch-nightly version and it does not have the memory leakage issue anymore. Also, the syntax is more similar to what you have shown in the tutorial.
Thank you very much for your help!
Best,
Ziyi