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

Did you find that it failed when you use padding="VALID"? #9

Open
Zealoe opened this issue Feb 3, 2018 · 6 comments
Open

Did you find that it failed when you use padding="VALID"? #9

Zealoe opened this issue Feb 3, 2018 · 6 comments

Comments

@Zealoe
Copy link

Zealoe commented Feb 3, 2018

I met a problem that when i set padding="VALID", the loss function did not converge. However, it converged when i set padding="SAME"...other config is same.
And i also dumped the offset. it was clipped by 0?? (I didn't use tf.clip at all)
image

@Zardinality
Copy link
Owner

What dilation_rate did you use? I am guessing maybe because I use partial version of GetWindowedOutputSize. You can change all function call of GetWindowedOutputSize in deform_conv.cc like in here to GetWindowedOutputSizeV2 and rebuild.
Also, a dirty workaround would be slice your input to make its spatial dimension divisible by param.

@Zealoe
Copy link
Author

Zealoe commented Feb 4, 2018

the input feature map is 24*24, and the offset conv setting is
image

the deformable conv setting is
image

@Zealoe
Copy link
Author

Zealoe commented Feb 5, 2018

sorry to disturb, but when i change GetWindowedOutputSize in deform_conv.cc and rebuild, it failed when i run g++_complie.sh. So what should i do to make it work? Thanks!
image

@Zardinality
Copy link
Owner

I am also baffled why it failed to build, GetWindowedOutputSize and GetWindowedOutputSizeV2 are defined in the same file, and your arguments seem all right.
In fact, I was wondering, now that your spatial dimension is exactly divided by filter size, shouldn't VALID and SAME behave just the same?

@Zealoe
Copy link
Author

Zealoe commented Feb 26, 2018

What version of tensorflow do you use? I am using 1.1.0 and GetWindowedOutputSizeV2 is not defined in common_shape_fns.h .. if i copy the file common_shape_fns.h including GetWindowedOutputSizeV2 to my tensorflow, the deformable conv can be built, but when i use it, it shows
image

@Zardinality
Copy link
Owner

@Zealoe GetWindowedOutputSizeV2 is introduced in this commit, so I guess it should be 1.3 or 1.4 at least. Good luck with it.

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