CUDA error: device-side assert triggeredCUDA kernel errors might be asynchronously reported...

最近在使用RESNET50的预训练模型迁移学习(transfer learning),因为RESNET50的最后的连接层out_features输出是1000,我这里疏忽写的out_features=5CUDA error: device-side assert triggeredCUDA kernel errors might be asynchronously reported..._第1张图片

 ,在开始训练的时候,我用的是CIFAR10数据集,是一个十分类的,只要label超过了5就会报这个错,因为图片对应的target超过5,在经过全连接层的时候,输出大于out_features。

是个小白,刚刚接触,记录一下!

CUDA error: device-side assert triggeredCUDA kernel errors might be asynchronously reported..._第2张图片

RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

你可能感兴趣的:(深度学习,目标检测,人工智能)