dhanush-ai1990
dhanush-ai1990

Reputation: 345

Keras model to plot gives none, dimensions

I am trying to plot VGG16 architecture diagram using Keras. However, i see the below image with None, some dimension. What does None mean, is that a bug ?

enter image description here

from keras.utils import plot_model
model = VGG19(include_top=True, weights='imagenet')
#print(model.summary())
plot_model(model, to_file='model_Vgg19.png',show_shapes=True)

I can see that this is a known issue in Keras: https://github.com/keras-team/keras/issues/1877.

Upvotes: 0

Views: 1597

Answers (1)

Abdelrahman Ahmed
Abdelrahman Ahmed

Reputation: 541

The None dimension in the shape tuple refers to the batch dimension which simply means that the layer can accept input of any size. For example, a dataset (e.g. MNIST) could have the following shape tuple (60000, 28, 28, 1) but the input layer's shape would be (None, 28, 28, 1).

References:

Upvotes: 7

Related Questions