AI/부스트 캠프
Jupyter Notebook에서 kernel끄지 않고 cuda비우기
openingsound
2021. 5. 4. 00:43
1
2
3
4
5
6
|
import gc
obj = model
gc.collect()
torch.cuda.empty_cache() # PyTorch thing
|
cs |
실험 시 매우 유용하고 자면서 모델을 돌릴 때 필수다