Created
February 6, 2020 06:24
-
-
Save mohdsanadzakirizvi/3163f59ca6394165807563947277e3b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model2 = Sequential() | |
model2.add(Flatten(input_shape=(7,7,512))) | |
model2.add(Dense(100, activation='relu')) | |
model2.add(Dropout(0.5)) | |
model2.add(BatchNormalization()) | |
model2.add(Dense(10, activation='softmax')) | |
# compile the model | |
model2.compile(optimizer='adam', metrics=['accuracy'], loss='categorical_crossentropy') | |
model2.summary() | |
# train model using features generated from VGG16 model | |
model2.fit(vgg_features_train, train_target, epochs=50, batch_size=128, validation_data=(vgg_features_val, val_target)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment