Skip to main content
. 2022 Nov 22;22(23):9036. doi: 10.3390/s22239036
Algorithm 2 DL training procedure.
Input: Data set Λ, training data number ntrain, training batch size B, total training epoch number Γmax and learning rate lr.
Output: A neural network Q^ with ω^.
1: initialization: Set the first training epoch number Γ=1 and a neural network Q with random weight ω.
2: Randomly select ntrain data from Λ as Λtrain and the rest to testing data set Λtest.
3: while Γ<Γmax do
4:  Randomly select B data from Λtrain, and compute the sum of the cross entropy loss.
5:  Compute the gradients of ω.
6:  Perform Adaptive Moment Estimation (Adam) gradient descent training to update ω using the obtained gradients.
7:  Calculate the accuracy of neural networks replicating human behavior in training data set Λtrain.
8:  Perform Γ=Γ+1
9: end while
10: Calculate the accuracy of neural networks replicating human behavior in training data set Λtest.
11: return the trained neural network Q^ with ω^.