```python import gc import torch del model gc.collect() torch.cuda.empty_cache() ``` import gc import torch del model gc.collect() torch.cuda.empty_cache() Last modification:February 13, 2022 © Allow specification reprint Like If you think my article is useful to you, please feel free to appreciate