Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

feature map size after upsample is 2h or 2(h+1)? #141

Open
Lucksong opened this issue Oct 12, 2019 · 3 comments
Open

feature map size after upsample is 2h or 2(h+1)? #141

Lucksong opened this issue Oct 12, 2019 · 3 comments

Comments

@Lucksong
Copy link

As your code 'self.upscore2 = nn.ConvTranspose2d( n_class, n_class, 4, stride=2, bias=False)' for example.
According to the deconvolution formula described in the pytorch documentation:
Hout=(Hin−1)∗stride[0]−2∗padding[0]+kernel_size[0]+output_padding[0]

Hout should be 2*(Hin+1) not 2*Hin

@Lucksong
Copy link
Author

So,2*(h+1) is right? Shouldn`t it be 2*h?

@super233
Copy link

super233 commented Feb 9, 2020

Hi, Has your question been solved? @Lucksong
I also want to know why it not be 2*Hin but 2*(Hin+1).

@tengjunvan
Copy link

I'm confused as well. I think there is something to do with the input data because I notice a slice operation of "h" in forward.

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

3 participants