0 votes
1 view
in Machine Learning by (15.5k points)

What is "epoch" in keras.models.Model.fit? Is it one gradient update? If it is more than one gradient update, then what is defining an epoch?

Suppose I am feeding my own batches to fit. I would regard "epoch" as finishing to process an entire training set (is this correct)? Then how to control keras for this way? Can I set batch_size equal to x and y size and epochs to 1?

1 Answer

0 votes
by (33.2k points)

Epoch: It is an arbitrary cutoff, generally defined as "one pass over the entire dataset", used to separate training into distinct phases, which is useful for logging and periodic evaluation.

A number of epochs mean how many times you go through your training set.

The model is updated each time a batch is processed, which means that it can be updated multiple times during one epoch. If batch_size is set equal to the length of x, then the model will be updated once per epoch.

Hope this answer helps.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !