-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Hey Guys,
i'm currently trying to use the networt with coco_4_gpu on infering one image.
I'm inputting:
-jpg image with 1280x720
img = cv2.imread('00000001.jpg')
img = cv2.resize(img,(1280,720),interpolation=cv2.INTER_CUBIC)
img = img.transpose(2, 0, 1)
img_tensor = torch.from_numpy(img)
img_tensor = torch.unsqueeze(img_tensor,0).type(torch.FloatTensor).cuda()
img_info = np.array([[720, 1280, 3]])
data = {'data': img_tensor , 'img_info' : img_info}
When im running the model output i get:
88 fpn_p5_upsample = self.fpn_upsample(fpn_p5_1x1)
---> 89 fpn_p4_plus = fpn_p5_upsample + fpn_p4_1x1
90 fpn_p4_upsample = self.fpn_upsample(fpn_p4_plus)
91 fpn_p3_plus = fpn_p4_upsample + fpn_p3_1x1
RuntimeError: The size of tensor a (46) must match the size of tensor b (45) at non-singleton dimension 2
Whats the matter?
Im on Pytorch 1.4.
Kindest regards!