因此,我随机尝试了一些特定的图像,以找到它的no。通道数 x=Image.open(dataset['image'][1100]) AttributeError: 'PngImageFile' object has no attribute'shape'
AttributeError: 'PngImageFile' object has no attribute 'ndim' 我想知道前100张图片的通道</e
我正在为MNIST时尚数据集创建CNN模型。我已经创建了一个成功的CNN模型。但我想对我从互联网上下载的另一张图像的分类模型进行测试。 我的所有训练和测试集的形状是(28,28,1)。但现在对于我想预测的图像,我将其调整为(28,28),并将其设置为一个RGB通道 cv2.cvtColor(load_img_rz, cv2.COLOR_BGR2GRAY) 现在图像的形状是(28,28我试着将它输入到模型中,但它显示错误 ValueError: Input 0 of la