-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't load HRNet Segmentation weights from PTH file #7
Comments
Hi, sorry, for super late reply. Where you using Windows? |
No, we were using Google Collab Notebooks (Ubuntu |
w32 & w48 not work, either. PyTorch 1.12, Python 3.9 on Paperspace learn = get_segmentation_learner(dls=dls, number_classes=2, segmentation_type="Semantic Segmentation",
architecture_name="hrnet", backbone_name="hrnet_w32",
splitter=segmentron_splitter,
loss_func=CustomLoss(),
metrics=[Dice, foreground_acc, JaccardCoeff],
wd=1e-3).to_fp16()
|
complete error message. |
After deleting the previous cache file, the notebook can load the hrnet_w32 weights. It seems the PTH cache will always be |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With
get_segmentation_learner(architecture_name='hrnet', backbone_name='hrnet_w18')
.Using the following callback to save the models during training:
SaveModelCallback(monitor='dice_multi', fname='best_model', with_opt=True)
The results of the predictions after loading "best_model.pth" with
learner.load
are zero-filled masks.The prediction using the learner right after training are correct.
The text was updated successfully, but these errors were encountered: