为什么for images, labels in train_ds.take(1):会报错呢(语言-python)

问题遇到的现象和发生背景

机器学习的猫狗识别代码时,发生的错误

问题相关代码,请勿粘贴截图

plt.figure(figsize=(15, 10)) # 图形的宽为15高为10

for images, labels in train_ds.take(1):
for i in range(8):

    ax = plt.subplot(5, 8, i + 1) 
    plt.imshow(images[i])
    plt.title(class_names[labels[i]])
    
    plt.axis("off")plt.figure(figsize=(15, 10))  # 图形的宽为15高为10
运行结果及报错内容

InvalidArgumentError: Number of channels inherent in the image must be 1, 3 or 4, was 2
[[{{node decode_image/DecodeImage}}]] [Op:IteratorGetNext]
<Figure size 1080x720 with 0 Axe

我的解答思路和尝试过的方法
我想要达到的结果