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

how to caculate the receptive field for the deconvolution layers #2

Open
caney1989 opened this issue Mar 24, 2018 · 2 comments
Open

Comments

@caney1989
Copy link

Hi!
I have read your paper carefully and your excellent work has gave me a lot of help. However, i have some trouble for how to caculate the receptive field for the deconvolution layers. I caculated the receptive field for the networks by myself , but i can not find the right way to caculate the deconvolution layers. Could you show me some details for this caculation?
Thanks very much!!

@bkayalibay
Copy link
Collaborator

Thank you for the kind words.
One can use eq. 7 of our paper to calculate the receptive field of any layer in the network:

rec_field_0 = 1
rec_field_next = rec_field_current + (2 ** (n_downsample - n_upsample)) * (filter_size)

n_downsample and n_upsample are the number of strided convolutions and deconvolutions used in the network up to that point. Essentially, the increase of the receptive field is just the usual increase one gets from using a convolution with a certain filter size, multiplied by a factor that depends on how much the image was up- or downsampled. For example, in Table 7, the receptive field size of layer 6 is 29. This increases to 45 in layer 7. This is because up to that point, we have used three subsampling operations, such that any 3x3x3 convolution increases the receptive field by 2^3 * 2 = 16. Between layer 7 and layer 9, the image gets upsampled using nn-interpolation. This means that the next 3x3x3 convolution will increase the total receptive field by 2^(3-1) * 2 = 8. After the next upsampling operation between layers 10 and 12, the increase will only be 2^(3-2) * 2 = 4, and so on.

@caney1989
Copy link
Author

I have figured out this poing. Thank you for your detailed explanation!!
Best wish to you !!!

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