Closed fksato closed 4 years ago
@fksato Thanks for the comment, we actually implement this as an virtual assert to make sure the model is correct and what we want it to be. Otherwise, one can replace AvergagePool by ReduceMean it will give the same as global average pooling with arbitrary kernel size.
Average pooling in r2plus1d, and possibly others, raise errors when dealing with frame depths not a multiple of 8. Suggested fix would be to change
final_temporal_kernel = int( clip_length / 8 / conv1_temporal_stride)
in r3d_model.py line 158 to:final_temporal_kernel = int( ceil(clip_length / 8) / conv1_temporal_stride)