-
gc.collect, torch.cuda.empty_cache()라이브러리/PyTorch 2022. 4. 25. 23:53
- gc.collect: Forces an immediate garbage collection of all generations
- torch.cuda.empty_cache(): Releases all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi
'라이브러리 > PyTorch' 카테고리의 다른 글
Don't forget to accumulate the Gradient (0) 2022.04.26 Learning Rate Scheduler (0) 2022.04.26 Tensor moduels (0) 2022.03.07 torch.utils.data (0) 2022.03.07 torch.optim (0) 2022.03.07