Perform max pooling on Integer tensor in Pytorch
I am defining a max pool layer and passing in an integer tensor as follows.

max_pool = nn.MaxPool2d(3, stride=2)
max_pool(torch.IntTensor(3,5,5).random_(0, 10))


It throws the following error: 

RuntimeError: _thnn_max_pool2d_with_indices_forward not supported on CPUType for Int


As the error message suggests, nn.MaxPoll2d only supports floating point input tensors.
You'll need to cast your input int tensor to torch.float before applying the pooling.
