An epoch is one complete training iteration over the configured training process or data. The epochs setting controls how long model fitting runs, alongside parameters such as learning rate, batch size, and data_step. section 5.1.1
In practical training experiments, epochs serve several roles:
- Set a fixed training budget, such as 500 epochs while comparing model size, data quantity, batch size, and learning rate. section 5.1.1
- Limit training during evolutionary architecture search; three epochs make repeated candidate evaluation brief, but may leave the resulting model diverging. section 7.5
- Trade training durability against computation: increasing epochs can improve the evolved model’s training assessment while substantially increasing evolution time. section 7.5
Listing 5.1 EDL_5_1_Hyperparameter_Tuning.ipynb: Hyperparameters
hp_test = "test 1" #@param {type:"string"} #1
learning_rate = 3.5e-03
epochs = 500
middle_layer = 25
batch_size = 2 #2
data_step = 1 #3
A notebook parameter cell exposes epochs beside learning rate, model width, batch size, and data_step, making the training budget easy to change experimentally. section 5.1.1
Listing 7.22 EDL_7_5_Evo_CNN.ipynb: The compile and train functions
def compile_train(model):
model.compile(optimizer='adam',
loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
metrics=['accuracy']) #1
model.fit(x_train, y_train, epochs=3, #2
verbose=0)
return model
The training function fixes model.fit at three epochs, showing how epoch count becomes part of repeated candidate evaluation. section 7.5









