m7mdal7aj commited on
Commit
c316009
1 Parent(s): fdc69a0

Update my_model/utilities.py

Browse files
Files changed (1) hide show
  1. my_model/utilities.py +2 -2
my_model/utilities.py CHANGED
@@ -296,8 +296,8 @@ def free_gpu_resources():
296
  """
297
  Clears GPU memory.
298
  """
299
- try:
300
- if torch.cuda.is_available():
301
  torch.cuda.empty_cache()
302
  torch.cuda.empty_cache()
303
  gc.collect()
 
296
  """
297
  Clears GPU memory.
298
  """
299
+
300
+ if torch.cuda.is_available():
301
  torch.cuda.empty_cache()
302
  torch.cuda.empty_cache()
303
  gc.collect()