Why maxpool2d takes float as a input

i don’t understand why maxpool2d takes float as a input, that caused me bug, i spend 1 hour to fix it

Hi,

What would you expect it to take as input?

just long would be ok, i mean why not long? ok i get it now.

It does not support long because we usually do neural networks, and since long tensors are not differentiable, most neural network functions are not implemented for them (it’s the same for conv for example).

1 Like