首页 > 其他分享> > AttributeError: ‘NoneType‘ object has no attribute ‘transpose‘ AttributeError: ‘NoneType‘ object has no attribute ‘transpose‘ 2020-12-26 13:58:39 作者:互联网 对图片进行操作时,报错: img = img.transpose(2,0,1) AttributeError: 'NoneType' object has no attribute 'transpose' 一般把图片路径、图片打印出来,看看有没有问题,我的就是图片忘记写.png了 标签:img,no,attribute,object,transpose,图片 来源: https://blog.csdn.net/qq_35037684/article/details/111727295