RTNet icon indicating copy to clipboard operation
RTNet copied to clipboard

The H and W of the input img of this function SelfScaling are 1 respectively?

Open longmalongma opened this issue 4 years ago • 3 comments

Thanks for your good work. The H and W of the input img of this function SelfScaling are 1 respectively? Otherwise, mul cannot be executed.

image

longmalongma avatar Jul 25 '21 16:07 longmalongma

Hi, the average pooling applies to the image which makes the H and W of the image become 1, therefore, image can be any size.

OliverRensu avatar Jul 26 '21 02:07 OliverRensu

Hi, the average pooling applies to the image which makes the H and W of the image become 1, therefore, image can be any size.

@OliverRensu The mul requires the two matrices to be the same. After pooling, the H and W become 1. If the image can be any size, the dimensions of the two matrices are different. How to perform mul?

longmalongma avatar Jul 26 '21 02:07 longmalongma

The size of the image is H and W, and the size of f is 1 and 1. The broadcast mechanism in torch will automatically extend the size of f to H and W. For more information about broadcast you can visit https://pytorch.org/docs/stable/notes/broadcasting.html

OliverRensu avatar Jul 26 '21 02:07 OliverRensu