Replies: 1 comment
-
I believe you are trying to load the weights file |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
i got the model.pt from the Brats Brain tumor model bundle. I got it from here:
https://github.com/Project-MONAI/model-zoo/releases/download/hosting_storage_v1/brats_mri_segmentation_v0.4.8.zip
(models/model.pt)
then i run:
device = torch.device("cpu")
loaded = torch.jit.load("model.pt")
model = loaded.to(device)
and i get this error shown below:
This links seems to suggest the error is coming because the model.pt file is corrupted.
https://stackoverflow.com/questions/69979034/runtimeerror-pytorchstreamreader-failed-locating-file-data-pkl-file-not-found
Any thoughts on what is going on ? will be helpful
Thanks
Mehul
Error message:
File /Applications/miniconda3/envs/py38/lib/python3.8/site-packages/torch/jit/_serialization.py:162, in load(f, map_location, _extra_files)
160 cu = torch._C.CompilationUnit()
161 if isinstance(f, str) or isinstance(f, pathlib.Path):
--> 162 cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
163 else:
164 cpp_module = torch._C.import_ir_module_from_buffer(
165 cu, f.read(), map_location, _extra_files
166 )
RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found
Beta Was this translation helpful? Give feedback.
All reactions