问题描述
tensorflow python framework erros invalidArgmentError:connot batch tensors with different shapes in componet 0. First element had shape [227,227,3] and element 19 had shape [227,227,4]
解决办法:数据集图像格式不对;convert(‘RGB’)
解决代码:
import numpy as np
from PIL import Image
import os
import cv2
directory_name='./flower_data/flower_photos/321'
for filename in os.listdir(director