For example I have a RGB images dataset and i want to train a CNN but I want to use these images as a grayscale . Is there any method that I can change RGB input to grayscale on run time? is it possible or i need to convert whole dataset from RGB to grayscale and then start training using this converted dataset?