How can I use a pre-trained neural network with grayscale images? : <p>I have a dataset containing grayscale images and I want to train a state-of-the-art CNN on them. I'd very much like to fine-tune a pre-trained model (like the ones <a href="https://github.com/tensorflow/models/tree/master/research/slim#Pretrained" rel="noreferrer">here</a>).</p>

<p>The problem is that almost all models I can find the weights for have been trained on the ImageNet dataset, which contains RGB images.</p>

<p>I can't use one of those models because their input layer expects a batch of shape <code>(batch_size, height, width, 3)</code> or <code>(64, 224, 224, 3)</code> in my case, but my images batches are <code>(64, 224, 224)</code>.</p>

<p>Is there any way that I can use one of those models? I've thought of dropping the input layer after I've loaded the weights and adding my own (like we do for the top layers). Is this approach correct?</p>
