马春杰杰 Exit Reader Mode

Process finished with exit code 132 (interrupted by signal 4: SIGILL)

网络训练好之后想进行测试来着,发现出现了这个错误:Process finished with exit code 132 (interrupted by signal 4: SIGILL)

原因是CPU的问题,只需要把模型放到GPU上即可。

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model.to(device)
out_put = model(img.to(device))

 

本文最后更新于2020年11月20日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!