Commit ·
6d0029c
1
Parent(s): 6cc08ce
Fix relative paths for PyTorch models
Browse files- sklearn_submission.py +6 -2
sklearn_submission.py
CHANGED
|
@@ -200,7 +200,9 @@ def _get_dgcnn_edge_model():
|
|
| 200 |
device = "cuda" if _torch.cuda.is_available() else "cpu"
|
| 201 |
except Exception:
|
| 202 |
device = "cpu"
|
| 203 |
-
|
|
|
|
|
|
|
| 204 |
return _DGCNN_EDGE_MODEL
|
| 205 |
|
| 206 |
|
|
@@ -223,7 +225,9 @@ def _get_dgcnn_vertex_model():
|
|
| 223 |
device = "cuda" if _torch.cuda.is_available() else "cpu"
|
| 224 |
except Exception:
|
| 225 |
device = "cpu"
|
| 226 |
-
|
|
|
|
|
|
|
| 227 |
return _DGCNN_VERTEX_MODEL
|
| 228 |
|
| 229 |
# v7: ensemble with the standalone tracks-based predictor.
|
|
|
|
| 200 |
device = "cuda" if _torch.cuda.is_available() else "cpu"
|
| 201 |
except Exception:
|
| 202 |
device = "cpu"
|
| 203 |
+
import os
|
| 204 |
+
model_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "edge_model_dgcnn.pt")
|
| 205 |
+
_DGCNN_EDGE_MODEL = load_edge_model(model_path, device=device)
|
| 206 |
return _DGCNN_EDGE_MODEL
|
| 207 |
|
| 208 |
|
|
|
|
| 225 |
device = "cuda" if _torch.cuda.is_available() else "cpu"
|
| 226 |
except Exception:
|
| 227 |
device = "cpu"
|
| 228 |
+
import os
|
| 229 |
+
model_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "vertex_model_dgcnn.pt")
|
| 230 |
+
_DGCNN_VERTEX_MODEL = load_vertex_model(model_path, device=device)
|
| 231 |
return _DGCNN_VERTEX_MODEL
|
| 232 |
|
| 233 |
# v7: ensemble with the standalone tracks-based predictor.
|