Network size describes a neural network’s scale through its numbers of nodes and layers. Tuning it balances feature extraction, fitting ability, training time, and generalization. section 5.1.1 section 1.5.2
Tune network size by considering:
- Increase layers to extract more features, while changing nodes or model width to adjust the fit. section 5.1.1
- Use larger networks when the source data has greater variability or requires more complex solutions. section 5.1.1
- Reduce oversized networks to limit memorization and overfitting; undersized networks may underfit varied data. section 1.5.2
- Compare size changes experimentally, including their effect on evolutionary convergence. section 6.2.1
Changing the middle layer
A hyperparameter experiment sets middle_layer = 25, then reruns training while changing the layer size. Compare plots and training outcomes to seek the smallest model that trains quickly and performs well. section 5.1.1 section 6.2.1
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
Inspect the hyperparameter listing to locate the middle-layer size alongside learning rate, epochs, batch size, and data-step settings. section 5.1.1
