RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously re
1.首先插入importosos.environ['CUDA_LAUNCH_BLOCKING']='1'#下面老是报错shape不一致找出具体出错的代码位置2.我这边出错的代码是(设置断点调试,对比原来运行结果,分析出出错的那一行代码)target=one_hot.scatter_(1,labels.data,1)labels.data应该是有问题的,所以我输出矩阵的形状大小print(label