Can I use cv2.cvtColor(image,cv2.COLOR_GRAY2RGB) on a batch of data?
问题 I am working with Inception v3, trying to use MNIST JPG images as the dataset to predict. I am running into a problem when its time to input training batches into the model. The error is because of the shape. X_batch produces a shape of (?,299,299), where as the first layer needs a shape of (?, 299, 299, 3). In a different part of my code that displaces a few examples I was able to use example_image = cv2.cvtColor(example_image,cv2.COLOR_GRAY2RGB) to convert the examples into RGB which gave