Skip to content
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

shape error #11

Closed
iTomxy opened this issue Dec 12, 2023 · 2 comments
Closed

shape error #11

iTomxy opened this issue Dec 12, 2023 · 2 comments

Comments

@iTomxy
Copy link

iTomxy commented Dec 12, 2023

Hi, I'm pretraining the deeplabv2 to generate prototypes on another dataset. I find that the prediction is down-sampled to 33 $\times$ 33 but not up-sampled. Why is that? Did you also down-sample labels? But it seems that you did not down-sample labels before calculating BCE and dice loss in train_UDA.py.

Note that I notice that there is a label_downsample function in train_UDA.py. But it is only used in the update_class_center_iter function, and that does not affect the shape of labels used for BCE and dice loss calculation.

Thanks.

@TFboys-lzz
Copy link
Owner

we have defined the interp function as:

interp = nn.Upsample(size=(input_size_source[1], input_size_source[0]), mode='bilinear',

@iTomxy
Copy link
Author

iTomxy commented Dec 12, 2023

Oh, my bad. Thanks. You're really responsive.

@iTomxy iTomxy closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants