runtimeerror: input type (torch.cuda.floattensor) and weight type (torch.floattensor) should be the

# Load model
device = select_device(device)
model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half)
model.cuda()#使用gpu,用这个将模型数据导入,如用cpu跑把这段注释即可
stride, names, pt = model.stride, model.names, model.pt

说明:加入model.cuda()
或者model = model.cuda()

你可能感兴趣的:(深度学习,python,人工智能)