finally?
Browse files- 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 |
# --------------------------------------------------------------------------------------
|