cool i will try that.
I tried running your code and came across a problem:
AttributeError: module 'torch.cuda' has no attribute 'memory_allocated' - i guess it’s because my pytorch is not compiled from the source code?