![](https://csdnimg.cn/release/download_crawler_static/12145712/bg5.jpg)
US Naval Research Laboratory Technical Report 5510-026
The second example is on the Imagenet dataset with two architectures: resnet-50, and inception-
resnet-v2. Here the cause of underfitting is due to the underlying complexities of the data distribu-
tions. In Figure 3b the test loss continues to decrease over the 100,000 iterations (about 3 epochs) but
the inception-resnet-v2 decreases more and becomes more horizontal, indicating that the inception-
resnet-v2 has less underfitting.
Increasing the learning rate helps reduce underfitting. An easy way to find a good learning rate is
the LR range test (Smith, 2017) (additional description of the LR range test is in Section 4.1).
(a) Cifar-10 dataset with a shallow 3 layer network. (b) Imagenet dataset with resnet-50 architecture.
Figure 4: Increasing validation/test loss indicates overfitting. Examples of overfitting are shown for
Cifar-10 and Imagenet. WD = weight decay, LR = learning rate, CLR = cyclical learning rate, CM
= cyclical momentum.
3.3 OVERFITTING
Overfitting tends to be more complicated than underfitting but clues are visible in the test loss. In
Figure 2 the test loss goes from underfitting (decreasing) to overfitting (increasing) but overfitting
in neural networks is often not so simple. In Figure 1 there are signs of overfitting in the test loss at
small learning rates (0.01 - 0.04) but then the test loss continues to decrease at higher learning rates
as though it is underfitting. This indicates that learning rates that are too small can exhibit some
overfitting behavior.
Figure 4a displays test loss for training a shallow, 3-layer network trained on Cifar-10. The figure
shows the results of a learning rate range test at three values for weight decay (WD). At WD = 10
−4
the loss reaches a minimum loss near a learning rate of 0.002, then begins to increase, displaying
overfitting. If WD = 4 × 10
−3
, the loss is stable over a larger range of learning rate values and the
loss attains a lower loss value, indicating that the latter WD value is superior to the former. Also
note that the sharp increase in loss for the yellow curve near the learning rate of 0.005 is not a sign
of overfitting but is caused by instabilities in the training due to the large learning rate. Similarly,
the red curve diverges above a learning rate of 0.008.
The next example is training the Imagenet dataset with a resnet-50 architecture. While the blue
curve in Figure 4b shows underfitting with weight decay of 10
−4
and a constant learning rate of
0.1, the red curve shows overfitting with too small a weight decay of 10
−7
. Both curves indicate
non-optimal settings of the hyper-parameters.
An additional example of overfitting is visible with the yellow curve in Figure 7a as it slowly rises
above LR=0.006 and until divergence near LR=0.01. The blue curves in Figure 9a and in Figure
11a show two additional forms of overfitting. The former illustrates a more gradual increase in the
error while the later shows a temporary initial increase (additional analysis of this Figure is given in
Section 5.5). All situations are examples of incorrectly set hyper-parameters.
The art of setting the network’s hyper-parameters amounts to ending up at the balance point between
underfitting and overfitting.
5