|
Algorithm 1: Model training algorithm. |
| 1: Read Data
|
| 2: Pre-train the model |
| 3: for model in CNN, RNN, …, Transformer do |
| 4: for i in 1, 2, 3, 4, 5 do |
| 5: 1. Batch and Shuffle by Mini-batch size to Generate
|
| 6: 2. Randomly divide as the training set , validation set , test set
|
| 7: Initialize and randomly by the Gaussian distribution |
| 8: Reading parameter configuration information |
| 9: for epoch in 1 to 20 do |
| 10: 3. # calculate the value before activation |
| 11: 4. # the value after activation |
| 12: 5. = Equation (4) # compute loss |
| 13: 6.
|
| 14: 7. = Equation (5) # fit the regression curve |
| 15: 8. = Equation (7) # update model parameters |
| 16: End |
| 17: End |
| 18: End |
| 19: Fine-Tune. |