After kears fit_generator, how to obtain the loss of value loss.
For example, train_loss and val_loss value
model = Model([model_body.input, *y_true], model_loss)
model.fit_generator(data_generator_wrap(train, BATCH_SIZE, input_shape, anchors, num_classes),
steps_per_epoch=max(1, num_train // BATCH_SIZE),
validation_data=data_generator_wrap(val, BATCH_SIZE, input_shape, anchors, num_classes),
validation_steps=max(1, num_val // BATCH_SIZE),
epochs=1,
initial_epoch=0)
Seeking loss here
Found method:
h = model.fit_generator(data_generator_wrap(train, BATCH_SIZE, input_shape,
anchors, num_classes),
steps_per_epoch=max(1, num_train // BATCH_SIZE),
validation_data=data_generator_wrap(val, BATCH_SIZE, input_shape, anchors, num_classes),
validation_steps=max(1, num_val // BATCH_SIZE),
epochs=1,
initial_epoch=0)
print (h.history)
Print the results of which have loss and val_loss