asyml / texar

Toolkit for Machine Learning, Natural Language Processing, and Text Generation, in TensorFlow. This is part of the CASL project: http://casl-project.ai/
https://asyml.io
Apache License 2.0
2.39k stars 372 forks source link

Is there anyway to empty cache/memory after loading get-2 into our model? #271

Open fabrahman opened 4 years ago

fabrahman commented 4 years ago

I wonder if there is any strategy to empty cache after loading (Restoring) gpt2 parameters into our model? I am getting OOM error for batch_size and I wonder how if there is anyway to get around that when using massive pre-trained models?