Input to cuda not register

    image = (np.random.random((416, 416, 3)) * 250).astype('uint8')
    im = Image.fromarray(image)
    x = TF.to_tensor(im)
    x = x.unsqueeze_(0)
    x = Variable(x)

    # Get detections
    with torch.no_grad():
        detections = model(input_imgs)
        detections = non_max_suppression(detections, opt.conf_thres, opt.nms_thres)

got error:
Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same

so I check and got:
x.is_cuda = False

x.cuda() is not an inplace method, so you would have to reassign the return value:

x = x.cuda()

Thank you
(The post must be 20 char long?l :face_with_raised_eyebrow:)