I am trying to run Allen NLP Elmo model but it doesn’t work due to lack of GPU memory. However, there is no PyTorch session running and also I have tried doing:
import torch
torch.cuda.empty_cache()
and
import gc
gc.collect()
but the error message is the same. How can I fix this? Looks like a common issue with no clear solution for this. Thanks!