_thnn_conv2d_forward is not implemented for type torch.LongTensor

Traceback (most recent call last):
File “F:/pg/project/segmentation_eval/semseg/tool/test_fm.py”, line 100, in
main()
File “F:/pg/project/segmentation_eval/semseg/tool/test_fm.py”, line 56, in main
test(args)
File “F:/pg/project/segmentation_eval/semseg/tool/test_fm.py”, line 93, in test
output = model(input)
File “D:\anconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “F:\pg\project\segmentation_eval\semseg\model\pspnet.py”, line 141, in forward
x = self.layer0(x)
File “D:\anconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “D:\anconda\envs\pytorch\lib\site-packages\torch\nn\modules\container.py”, line 92, in forward
input = module(input)
File “D:\anconda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py”, line 489, in call
result = self.forward(*input, **kwargs)
File “D:\anconda\envs\pytorch\lib\site-packages\torch\nn\modules\conv.py”, line 320, in forward
self.padding, self.dilation, self.groups)
RuntimeError: _thnn_conv2d_forward is not implemented for type torch.LongTensor

It seems that one of your inputs to the Conv2d layer is in dtype Long while it should be some kind of float.