saraherceg
saraherceg

Reputation: 341

Inception v3 and Xception for data with 2 channels

I am trying to use the pre-trained models for my own data which is in the shape (64,256,2) and I am able to change input shape for VGG16 and ResNet50 like this:

base_model = keras.applications.vgg16.VGG16(input_shape=(32,128,2), include_top=False, weights=None)

However, the same method does not work for both Inception v3 and Xception. The error I get is:

model = keras.applications.inception_v3.InceptionV3(input_shape=(64, 256, 2), weights=None, include_top=False)

Input size must be at least 75x75; got `input_shape=(64, 256, 2)`

Any ideas on how to go over this? Thank you!

Upvotes: 0

Views: 633

Answers (1)

Zabir Al Nazi Nabil
Zabir Al Nazi Nabil

Reputation: 11198

There is a minimum dimension for width/height for most of the convolutional neural network.

https://github.com/fchollet/deep-learning-models/blob/master/inception_v3.py

There are many pooling layer in the network which reduces the feature map dimension by a factor, if your input is too small the network can pass your input to the end without reaching 0 height/width for feature map. So, you must use the specified minimum dimension for the network, in this case 75by75.

Upvotes: 1

Related Questions