RoIAlign.pytorch
RoIAlign.pytorch copied to clipboard
why can not use float64
I have debugged the code for about ten years. Finally, I found cannot use dtype of the box as float64.
WHY??????????????????????????????????????????????
I think this code is a little bit stupid.
Because THFloatTensor
and THCudaTensor
is float32, THDoubleTensor
and THCudaDoubleTensor
is float64.
The type of box is defined as THFloatTensor
or THCudaTensor
in
https://github.com/longcw/RoIAlign.pytorch/blob/master/roi_align/src/crop_and_resize.h#L3
Actually, I don't know why you need ten years to find such an error :) The proper way is to raise an exception if you are using a THDoubleTensor as the input which only accepts THFloatTensor.