As the error clearly states, it seems that your data contains a mixture of grayscale and RGB images, use ColorPreprocessing Name-Value pair argument to ensure that all output images have the same number of channels as required by the imageInputLayer of your network.
Refer to the description of ColorPreprocessing of AugmentedImageDatastore and Import Data into Deep Network Designer for more information.