InceptionV3 -> input shape

The online Keras description of inceptionV3 states that:

  • “input shape has to be `(299, 299, 3)” → InceptionV3

In the exercices C2W3 (Assignement +lab1) , another input shape is used:
pre_trained_model = InceptionV3(input_shape = (150,150,3)…


  • What are the implications of this ?
  • Should we not reframe the image to suit the (299,299,3) shape recommended by the inceptionV3 ?


Hello @Manu
As it is clearly written in this documentation the input_shape is optional except it has to be declared when include_top is set to False. And the tuple (299, 299, 3) is the default value so if you have your own distribution It should have exactly 3 inputs channels, and the width and height should be no smaller than 75.

1 Like

Thank you, you are right, it is indeed said that it should have 3 input channels

What could be done if I want to input an image with a very high number of channels, for example: (150, 150, 75) with include_top = False ?

I actually have a case in spatial analysis where I would like to use this pretrained network and input a very high number of channels, hence my question.

1 Like

Hi, @Manu!

One idea that comes to my mind is prepending a couple of layers that input your (150, 150, 75) matrix and outputs a (299, 299, 3) one. As you would initialize those weights randomly, I suggest to freeze the Inception backbone for a couple of epochs to “warm up” the new first layers to perform a correct feature extraction before starting the full training.


Thanks a lot @alvaromajo, I will try this

1 Like