receptive_field_for(net: torch.nn.modules.module.Module, input_size: Tuple[int, int, int])¶
Compute the receptive field of
netusing a backward pass.
Make sure the net does not have any normalization operation: mean / std operations impact the whole volume and make the calculation invalid. (BatchNorm is okay in eval mode)
input_size (Tuple[int, int, int]) – a (C, H, W) volume size that the model can accept. Note that the receptive field calculation is bounded by this size.
height and width receptive fields.