## 4 Grade Prediction Method Based on DNNs
### Grade Prediction Based on the DNN  
The DNN is built using the Python language and the Pytorch framework [34], with 28-course scores as the featured item in the input and output layers predicting the scores of three courses. The network is also constructed with six hidden layers of 1375 neurons in total. Then, the number of neurons in the eight layers is 28, 256, 128, 512, 256, 128, 64, and 3, respectively. As shown in Algorithm 1, a number of parameters, such as activation, optimiser, loss, batch size, weight decay, epochs, and the early termination of iteration threshold, are set. The previously processed dataset A is used as a sample for training. Each layer's W and B values are solved using iterative training with the BP until the current training iterations reach the specified number or the loss reaches the set threshold. Then, the trained model is solidified to the specified position to complete the training. Many experimental tests are performed following relevant steps. Finally, the MSEL between test and training data is used as an indicator to obtain and set multiple attribute parameters  
Figure 2: Deep neural network structure diagram. consistent with the project, thus obtaining the final training and results. Figure 3 shows the decline process of the DNN training the MSEL. ```
0: 'data set': the training set, validation set, test set;
1: 'epochs': the maximum number of iterations;
2: 'batch size': the minimum batch size of the data loader;
3: 'optimizer': the optimisation algorithm (optimiser in torch.optim);
4: 'optim hparas': the learning rate, momentum, regularisation factor;
5: 'early stop': the number of epochs since the model was last improved;
6:'save path': the model will be saved here;
7: The trained deep neural network model;
8: initialize the parameters according to the input;
9: data normalisation;
10: create a network;
11: train the network:
12: repeat for training process:
13: forward-propagation;
14: back-propagation;
15: **until** for reaches the end condition
16: Using the network;
17: The data are reversely normalized;
```  
**Algorithm 1** The Pseudocode of DNN Algorithm  
When the DNN training is completed, the model parameter is saved to the memory. Subsequently, the offline model is then read, and the trained network model is used to predict the grades. Finally, the predicted value is compared with that of real data, and dark-green and orange-dotted lines are used to mark the initial and predicted data values, respectively. Because multiple courses require prediction, we selected three representative subjects to demonstrate in the experiment project, namely Physical Chemistry of Metallurgy 1, University English 4, and Linear Algebra B. As shown in Figure 4, a broken line comparison diagram of predicted and real grades in the corresponding courses is generated using the abovementioned approach, with 65 and 60 as the early warning and passing grades, respectively. Figure 3: DNN training. The overlapped brownish-red line shows that the predicted data agree with the real data when the two lines are overlayed with a degree of transparency. However, the non-overlapping parts indicate certain errors in the model. Students' grades in different semesters may fluctuate with attitude changes. However, they are not distinct in most semesters. Figure 4: DNN training. data, indirectly demonstrating that the volatility is in the acceptable range. Accordingly, the current model and parameters can be used for stable test set fitting. An automated batch programme is set up as per the process to predict the grades of all courses in the current semester. The prediction results are shown in Table 1.  
We automatically acquired the predicted grades of <65 and requested the student's e-mail IDs from the database. E-mails were generated in fixed forms using the predicted grades via an automatic batch mail system and then sent to students from the college teacher's official email to remind them to master the important learning points.