Fangyh09 / pytorch-receptive-field

Compute CNN receptive field size in pytorch in one line
Apache License 2.0
348 stars 57 forks source link

Receptive Field Region #13

Closed hamedbehzadi closed 2 years ago

hamedbehzadi commented 2 years ago

Hi Thanks for sharing this code as I don't see another library in pytorch for this. Does the code compute the receptive field region for any feature location in a feature map?or just compute the size of the field for each layer?

Thank you

Fangyh09 commented 2 years ago

Does the code compute the receptive field region for any feature location in a feature map?

Yes, this can be inferred from output.

Fangyh09 commented 2 years ago

Function receptive_field_for_unit https://github.com/Fangyh09/pytorch-receptive-field/blob/master/main.py#L28