1

When we execute something like this:

model.compile(Adam(lr=0.0001),loss='sparse_categorical_crossentropy',metrics=['accuracy']) model.fit(train_sample, label, batch_size=10, nb_epoch=25, verbose=2) 

On which data are the loss and accuracy (output like loss: 0.6971 - acc: 0.4965) are calculated on? Is it generating a validation set by itself implicitly or simply giving us error based on training data?

2
  • This is clearly mentioned in the docs keras.io/models/model/#fit - idownvotedbecau.se/noresearch Commented Jul 23, 2018 at 11:19
  • You could write in a plain text, sir. :) and yeah I searched that in the page but a little poor in English that why maybe i didn't find what i was looking for. :) Commented Jul 23, 2018 at 11:28

2 Answers 2

1

If you add a float for validation split it will output the validation loss on a seperate split off validation set. If you do not provide the validation data, which is the default, like in your case, then the running average of the training loss is returned.

The details of the fit function are described in: https://keras.io/models/model/#fit.

Sign up to request clarification or add additional context in comments.

Comments

0

Plain loss and accuracy is always computer on the training set, as this is what guides learning. When validation loss is compuuted, it is printed as "val_loss", and same for accuracy as "val_accuracy". So if there is no "val" in the name, it means it has to be evaluated on the training set.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.