Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

question about test on one class choice #45

Closed
MrAirplaneLu opened this issue Apr 29, 2021 · 6 comments
Closed

question about test on one class choice #45

MrAirplaneLu opened this issue Apr 29, 2021 · 6 comments

Comments

@MrAirplaneLu
Copy link

MrAirplaneLu commented Apr 29, 2021

I directly train the full dataset, then use this trained model to test on one class choice
but there was a problem:
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.conv11.weight: copying a param with shape torch.Size([50, 256, 1]) from checkpoint, the shape in current model is torch.Size([4, 128, 1]).

I hope you can answer. Thank you very much!

image

@antao97
Copy link
Owner

antao97 commented Apr 29, 2021

If your model is trained with the full dataset, you can't test it with a single class in the test set.

If you really want to test its performance in one class, see #10.

@MrAirplaneLu
Copy link
Author

Now I want to check the Miou, ACC and other information of each class. Is there any convenient way?
Thanks again

@antao97
Copy link
Owner

antao97 commented May 1, 2021

I think it may be impossible to use existing functions to calculate the mAcc and mIoU of a single class if your model is trained with full dataset. The label prediction of each point can be in anywhere of 50 labels. You can write some code to calculate them manually.

You can still calculate Acc by using metrics.accuracy_score.

@MrAirplaneLu
Copy link
Author

Then I can calculate the Miou of each class separately in the prediction, which is equivalent to modifying the calculation_ shape_ IOU, right?

@antao97
Copy link
Owner

antao97 commented May 5, 2021

Yes

@MrAirplaneLu
Copy link
Author

Thank you very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants