Algorithm 1. Adam Hyper-parameter Tuning |
-
Step 1.
Start Algorithm
-
Step 2.
Initialise iteration counter, t = 0
-
Step 3.
Initialise and assign values to hyper-parameters β1, β2, , , , ,
-
Step 4.
Initialise parameters (weights) for the chosen classifier
-
Step 5.
Define the loss function to be minimised.
-
Step 6.
For each iteration t:
-
Step 7.
Compute the gradient of the loss function with respect to the hyper-parameters,
-
Step 8.
Update the exponential moving averages of the gradient and its square, and using Equations (30) and (31)
-
Step 9.
Compute bias-corrected estimates of the averages, and using Equations (28) and (29)
-
Step 10.
Update the parameters (weights) or the chosen classifier
-
Step 11.
Calculate for the current equation
-
Step 12.
If , compute the gradient of the loss function with respect to the hyper-parameter
-
Step 13.
Else if , compute the gradient of the loss function with respect to the hyper-parameter
-
Step 14.
Update the hyper-parameter
-
Step 15.
If t = ConvCrit
-
Step 16.
Go to Step 19
-
Step 17.
Else
-
Step 18.
Go to Step 7
-
Step 19.
End Algorithm
|