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

question about padding in conv2d #54

Closed
xslittlegrass opened this issue Feb 14, 2017 · 2 comments
Closed

question about padding in conv2d #54

xslittlegrass opened this issue Feb 14, 2017 · 2 comments

Comments

@xslittlegrass
Copy link

xslittlegrass commented Feb 14, 2017

In the file net/ops/convolution.py:

temp = tf.pad(self.inp.out, [[0, 0]] + pad + [[0, 0]])
temp = tf.nn.conv2d(temp, self.lay.w['kernel'], padding = 'VALID',  name = self.scope, strides = [1] + [self.lay.stride] * 2 + [1])

Is this equivalent to the 'same' padding, tf.nn.conv2d(..., padding ='SAME')?

@jiangsutx
Copy link

jiangsutx commented Feb 27, 2017

I think they are the same.

I reimplement this yolo2 net by myself with the same pretrained weight. (slim.conv2d & padding='SAME')
The output is the same as Darkflow.

@thtrieu thtrieu closed this as completed Mar 13, 2017
@xslittlegrass
Copy link
Author

@jiangsutx Thanks!

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