Spaces:
Runtime error
Runtime error
Update run_inference.py
Browse files- run_inference.py +2 -1
run_inference.py
CHANGED
|
@@ -4,7 +4,7 @@ import torch
|
|
| 4 |
|
| 5 |
# Allow unpickling of HistoryBuffer
|
| 6 |
from mmengine.logging.history_buffer import HistoryBuffer
|
| 7 |
-
# Allow numpy reconstruct, ndarray, dtype, and
|
| 8 |
import numpy as np
|
| 9 |
import numpy.core.multiarray as cam
|
| 10 |
import numpy.dtypes as dtypes
|
|
@@ -16,6 +16,7 @@ torch.serialization.add_safe_globals([
|
|
| 16 |
np.dtype,
|
| 17 |
dtypes.Float64DType,
|
| 18 |
dtypes.Int64DType,
|
|
|
|
| 19 |
])
|
| 20 |
|
| 21 |
import torch.nn as nn
|
|
|
|
| 4 |
|
| 5 |
# Allow unpickling of HistoryBuffer
|
| 6 |
from mmengine.logging.history_buffer import HistoryBuffer
|
| 7 |
+
# Allow numpy reconstruct, ndarray, dtype, Float64DType, Int64DType, and getattr
|
| 8 |
import numpy as np
|
| 9 |
import numpy.core.multiarray as cam
|
| 10 |
import numpy.dtypes as dtypes
|
|
|
|
| 16 |
np.dtype,
|
| 17 |
dtypes.Float64DType,
|
| 18 |
dtypes.Int64DType,
|
| 19 |
+
getattr,
|
| 20 |
])
|
| 21 |
|
| 22 |
import torch.nn as nn
|