I´m using Detectron2 for train Faster R-CNN model for object detection and I want to train the model given by model zoo with inputs in the range [0 1] instead [0 255] so I used a Color transform which calls my function scale_transform
def scale_transform(img):
return img/255.
This function is receiving a numpy array and return it scaled. but, in train time this error appears
RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same
Someone knows how I can fix this problem? or another way to scale the images for detectron2?
Thanks