pytorch_memlab
pytorch_memlab copied to clipboard
weakly-referenced object no longer exists
Hello,
Firstly, congratulations for memlab. I have been trying to use it in Google Colab, but sometimes this error happens:
ReferenceError Traceback (most recent call last)
2 frames
/usr/local/lib/python3.7/dist-packages/pytorch_memlab/mem_reporter.py in
ReferenceError: weakly-referenced object no longer exists
In my code, I use MemReport() just right after the training phase, i.e.:
for epoch in range(num_epochs):
net.train()
...
# end of training
print('Reporter!!!!!!!') reporter = MemReporter() reporter.report()
Do you know what is the problem?
Thank you and regards.
This error message is weird.
Could you plz post the:
- memlab version
- pytorch version
- the computation devices (GPU type / CPU)
btw could you try adding a torch.cuda.synchronize
before creating a reporter
.
Hello,
I am using Google Colab. I just ran !pip install pytorch_memlab in the notebook. The PyTorch version is the one of Colab. The GPU I guess that is K80 but I am not so sure.
Thank you.