Spaces:
Running on Zero
Running on Zero
Update my_py_lib/torch_util.py
Browse files- my_py_lib/torch_util.py +1 -0
my_py_lib/torch_util.py
CHANGED
|
@@ -34,6 +34,7 @@ def recursive_to(data: dict, device: torch.device) -> dict:
|
|
| 34 |
return data
|
| 35 |
|
| 36 |
def cleanup_gpu_memory():
|
|
|
|
| 37 |
import gc
|
| 38 |
if torch.cuda.is_available():
|
| 39 |
gc.collect() # Force garbage collection
|
|
|
|
| 34 |
return data
|
| 35 |
|
| 36 |
def cleanup_gpu_memory():
|
| 37 |
+
return
|
| 38 |
import gc
|
| 39 |
if torch.cuda.is_available():
|
| 40 |
gc.collect() # Force garbage collection
|