How to calculate receptive field of blocks with skip connection?

安稳与你 提交于 2019-12-11 05:19:06

问题


Although there are many resources about how to calculate the receptive field (RF) of CNNs (ex: http://fomoro.com/tools/receptive-fields), I didn't find anything regarding skip connections. In [1] they mention that skip connections make the effective RF smaller, but what happens to the theoretical RF?

At the end of the day, I would like to know how to calculate the receptive field of a network comprising many residual blocks.

Thanks, Daniel


回答1:


TL;DR compute the receptive field ignoring all skip connections.

First, in a general case, let's say we have two branches of data flow - A and B. You can compute the receptive field for branches A and B independently, and then simply take the maximum when the branches merge. (The reason you can take the max is that branches typically merge via channels concatenation.)

Now, when one branch is a skip connection, and the other is not, the one which is not, gives the larger receptive field. If you have many skip connections, the longest route (with no skip connections) would give the maximum receptive field. Hence the result in TL;DR.


Getting the maximum among branches becomes more complicated if instead of a simple skip connection you have something like an inception block. In those cases, you may want to compute the receptive field directly by definition.



来源:https://stackoverflow.com/questions/47332379/how-to-calculate-receptive-field-of-blocks-with-skip-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!