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

In Con2d layer,how to pad "Same" not "Zero" #1021

Closed
a1363901216 opened this issue Mar 17, 2017 · 3 comments
Closed

In Con2d layer,how to pad "Same" not "Zero" #1021

a1363901216 opened this issue Mar 17, 2017 · 3 comments

Comments

@a1363901216
Copy link

In Con2d layer,how to pad "Same" not "Zero".

In tensorflow , i see the option to choose whether pad the "Same" pixel as edge or pad "Zero" pixel .But dose pytorch have that option?

@soumith
Copy link
Member

soumith commented Mar 17, 2017

pytorch does not have this option. if you want to do something like this, you have to explicitly pad via nn.functional.pad in the replicate mode: http://pytorch.org/docs/nn.html#torch.nn.functional.pad

@soumith soumith closed this as completed Mar 17, 2017
@a1363901216
Copy link
Author

thanks

@rtaori
Copy link

rtaori commented Jul 4, 2019

Why does pytorch not have this feature? It would greatly help with quick prototyping

jjsjann123 added a commit to jjsjann123/pytorch that referenced this issue Aug 5, 2021
Vectorization was disabled when broadcast inner axes exist.
Fixes pytorch#1021

patched with CI failure

Co-authored-by: jjsjann123 <alex.jann2012@gmail.com>
zhuhong61 pushed a commit to zhuhong61/pytorch that referenced this issue Jun 8, 2022
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

3 participants