You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same as this issue(#71 (comment) trained my model using custom dataset and when I run test.py, I am getting the following error:
Running,
python test.py
--in_channels=1
--out_channels=3
--space_x=1.0
--space_y=1.0
--space_z=1.0
--feature_size=32
--infer_overlap=0.5
--data_dir="/cluster/home/shan/ves/research-contributions/UNETR/BTCV/dataset/us/"
--pretrained_dir="/cluster/home/shan/ves/research-contributions/UNETR/BTCV/runs/unetrmonai_test/"
--pretrained_model_name="model.pt"
--saved_checkpoint=ckpt
produces the following error: Unexpected key(s) in state_dict: "epoch", "best_acc", "state_dict".
How to solve this? Thanks!
The text was updated successfully, but these errors were encountered:
I think the model.pt file you have contains information in addition to the weights for the model. The weights are under the key "state_dict" in this file, so you can extract them yourself and save to another file:
Same as this issue(#71 (comment) trained my model using custom dataset and when I run test.py, I am getting the following error:
Running,
python test.py
--in_channels=1
--out_channels=3
--space_x=1.0
--space_y=1.0
--space_z=1.0
--feature_size=32
--infer_overlap=0.5
--data_dir="/cluster/home/shan/ves/research-contributions/UNETR/BTCV/dataset/us/"
--pretrained_dir="/cluster/home/shan/ves/research-contributions/UNETR/BTCV/runs/unetrmonai_test/"
--pretrained_model_name="model.pt"
--saved_checkpoint=ckpt
produces the following error: Unexpected key(s) in state_dict: "epoch", "best_acc", "state_dict".
How to solve this? Thanks!
The text was updated successfully, but these errors were encountered: