0
$\begingroup$

In the Kaggle Dog Breed Identification kernel:

https://www.kaggle.com/gaborfodor/dog-breed-pretrained-keras-models-lb-0-3

The bottleneck features from the VGG16 model (using Keras) are feed into a multinomial logistic regression in order to achieve a validation accuracy of 91.8%. How would I make the equivalent Neural Network to this multinomial logistic regression. I have tried the following:

model = Sequential()
model.add(Dense(120,input_shape=train_data.shape[1:],use_bias=False))
model.add(Dense(120, activation='softmax',use_bias=False))

model.compile(optimizer='adam',
          loss='categorical_crossentropy',
          metrics=['accuracy'])

early_stopping = EarlyStopping(monitor='val_loss', patience=2)

model.fit(train_data, train_labels,
      epochs=50,
      batch_size=batch_size,
      validation_data=(validation_data, validation_labels),
      callbacks=[early_stopping])

How do I need to change the network architecture to perfectly mimic a multinomial logistic regression?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.