Invalid Argument Error / Graph Execution Error

I faced the same error and tried to test everything with no value, but I heard that you have to make the number of folders in the dataset the SAME as the one in Dense.

I don’t know if this will solve your specific bug or not but try this with your code:

vgg_model.add(tf.keras.layers.Dense(10, activation = 'softmax'))

Replace 10 with the number of training dataset folders or can call ‘classes’.

Leave a Comment