The current registered: [<monai.data.image_reader.NumpyReader object at 0x7fc8b1892980>, <monai.data.image_reader.PILReader object at 0x7fc8b1892920>]. #6798
Answered
by
KumoLiu
SawinKumar
asked this question in
Q&A
-
preproc_transforms = Compose(
[
LoadImaged(keys=["image"]),
EnsureChannelFirstd(keys="image"),
Orientationd(keys=["image"], axcodes="RAS"),
NormalizeIntensityd(keys="image", nonzero=True, channel_wise=True),
]
)
model.load_state_dict(torch.load("models/best_metric_model_epoch_40.pth"))
processed_data = preproc_transforms({'image': [tumor_file_path]}) The above code giving the error only on cpu machines.
When I try to change the map_location to cpu
This is the error
|
Beta Was this translation helpful? Give feedback.
Answered by
KumoLiu
Jul 31, 2023
Replies: 1 comment 8 replies
-
Hi @SawinKumar, did you put your model on the CPU?
Thanks! |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @SawinKumar, could you please try to install Nibabel? Seems you didn't have a suitable reader.
Thanks!