3D-ResNets-PyTorch icon indicating copy to clipboard operation
3D-ResNets-PyTorch copied to clipboard

Will using nn.AdaptiveAvgPool3d more convenient?

Open Nash2325138 opened this issue 5 years ago • 1 comments

https://github.com/kenshohara/3D-ResNets-PyTorch/blob/d9847ea56b0d4bc7601a229099deb2b483539514/models/resnet.py#L139

As the title stated, is there a reason to use nn.AvgPool3d instead of nn.AdaptiveAvgPool3d?

Using nn.AdaptiveAvgPool3d can help us get rid of calculating last_size and last_duration explicitly and passing sample_duration and sample_size as well. Furthermore, it will create a size/length agnostic model which seems to be more convenient.

Nash2325138 avatar Jul 25 '19 09:07 Nash2325138

I think it is. But it is equal to the current code because sizes are calculated carefully.

BestJuly avatar Jan 10 '20 05:01 BestJuly