nbro
nbro

Reputation: 15837

Is it possible to get the value of steps_per_epoch with which fit was executed?

Is it possible to get the value of steps_per_epoch with which fit was executed?

Please, do not suggest me to divide the number of training examples by the batch size. I am wondering if this can be retrieved from a property of the model or something.

Upvotes: 0

Views: 61

Answers (1)

today
today

Reputation: 33410

Yes, all the models in Keras have a default History callback which basically holds the history of training of the model. One piece of information which is stored in this callback is the value of steps_per_epoch which could be accessed using model.history.params['steps'].

Note that if the model has been saved after training, and then is loaded back later, then it may not be possible to access its History callback; that's because, as far as I know, the callback(s) is not persisted when saving the model.

Upvotes: 1

Related Questions