Inception v3 model with grayscale images

Modification of the inception v3 model for image classification with keras to work with grayscale images. You can also provide custom number of output classes (10 in this case).

inception = InceptionV3(weights='imagenet', include_top = True)
input_tensor = Input(shape=(img_height,img_width,1))
x = Conv2D(3,(3,3),padding='same')(input_tensor)    # x has a dimension of (img_height,img_width,3)
out1 = inception(x)
out = Dense(10, activation = 'softmax')(out1)

model = Model(inputs = input_tensor, outputs = out)