MogensR commited on
Commit
4d0dbc7
·
1 Parent(s): 4106ffb
Files changed (1) hide show
  1. models/__init__.py +6 -0
models/__init__.py CHANGED
@@ -21,6 +21,12 @@
21
  import numpy as np
22
  import yaml
23
 
 
 
 
 
 
 
24
  # --------------------------------------------------------------------------------------
25
  # Logging (ensure a handler exists very early)
26
  # --------------------------------------------------------------------------------------
 
21
  import numpy as np
22
  import yaml
23
 
24
+ # Import torch for GPU memory monitoring
25
+ try:
26
+ import torch
27
+ except ImportError:
28
+ torch = None
29
+
30
  # --------------------------------------------------------------------------------------
31
  # Logging (ensure a handler exists very early)
32
  # --------------------------------------------------------------------------------------