需要将输入数据image_tensor放到GPU上,即image_tensor = trans(image).unsqueeze(0)改为image_tensor = trans(image).unsqueeze(0).to(device)
👍
Sign in to make a reply
PBG
需要将输入数据image_tensor放到GPU上,即image_tensor = trans(image).unsqueeze(0)改为image_tensor = trans(image).unsqueeze(0).to(device)