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

deconv/unpool default output size not always correct #642

Open
denizyuret opened this issue Dec 10, 2020 · 2 comments
Open

deconv/unpool default output size not always correct #642

denizyuret opened this issue Dec 10, 2020 · 2 comments

Comments

@denizyuret
Copy link
Owner

denizyuret commented Dec 10, 2020

Multiple x sizes can lead to the same y size in conv and pool operations. Our current API picks one in the deconv and unpool implementations. Check out whether other frameworks use the same default and how we can give the user the option to pick different sizes in the API.

@denizyuret denizyuret changed the title deconv default output size not always correct deconv/unpool default output size not always correct Dec 12, 2020
@basitanees
Copy link

Tensorflow needs an output size to be specified. However, Pytorch does not need an output size to be specified according to their definitions here:
https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/nn/conv3d_transpose
https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose3d.html
The Pytorch implementation, however, takes arguments to add zero paddings to one (specified by 'output_padding' argument) or both sides (specified by 'padding' argument) to get a desired output shape. More information about the output shape and padding is available on the PyTorch link above.
However, I think specifying the output shape and adding the 'SAME' padding as in tensorflow implementation seems more user friendly.

@basitanees
Copy link

basitanees commented Dec 17, 2020

The PyTorch implementation also takes an optional output size parameter which calculates/ modifies the 'output_padding' parameter to match the output size specified by the user as can be checked here:
https://pytorch.org/docs/stable/_modules/torch/nn/modules/conv.html#ConvTranspose2d

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