# A Total Crop-Diagnosis Platform Based on Deep Learning Models in a Natural Nutrient Environment
## 2 Related Works
### A Design of a Crop Self-Diagnosis Module (CSM) Based on Deep Learning
#### 3.4.2 A Design of the TEDS
Finally, when the number of test samples is 2000, the accuracy was measured as 85.32%. When a tanh function was used as an activation function and the number of test samples was 500, the accuracy was measured as 88.94. When the number of test samples was 700, the accuracy was measured as 88.94. When the number of test samples was 1200, the accuracy was measured as 84.2%. Finally, when the number of test samples was 2000, the accuracy was measured as 82.45%. In summary, if a Sigmoid function is used as an activation function, the average accuracy is measured as 94.84%. If a ReLU function is used, the average accuracy is measured as 91.97%. If a tanh function is used, the average accuracy is measured as 87.38%. Therefore, the Sigmoid function is increased by about 3% and 7% in accuracy compared with ReLU and tanh, respectively. #### 4.2.2 The Analysis of the TEDS Performance

To analyze the TEDS performance, the number of hidden layers is set to 4. The number of nodes of each hidden layer is set to 15. The learning rate and weight are set at 0.1 separately. The experiment on the TEDS was performed twice and the result is as follows. The first experiment was to compare the learning time of neural network models according to training samples. Figure 18 shows the result. In the TEDS in Figure 18, when the number of the training samples is 21, the learning time is 0.96. When the number of training samples is 80, the learning time is 0.98. When the number of training samples is 120, the learning time is 0.90. When the number of the training samples is 150, the learning time is 0.95. The average learning time of the TEDS is 0.95. In the CNN in Figure 18, when the number of the training samples is 21, the learning time is 0.78. When the number of the training samples is 80, the learning time is 0.65. When the number of the training samples is 120, the learning time is 0.75. The average learning time of the CNN is 0.68. Figure 17: The data accuracy of an activation function. In the LSTM in Figure 18, when the number of the training samples is 21, the learning time is 1.30. When the number of the training samples is 80, the learning time is 1.34. When the number of the training samples is 120, the learning time is 1.44. When the number of the training samples is 150, the learning time is 1.4. The average learning time of the LSTM is 1.38. Therefore, the learning time of the TEDS is faster than that of the LSTM by about 0.43 and slower than the CNN by about 0.27. However, the following second experiment shows that the TEDS is better than the CNN in farm diagnosis. The second experiment was to compare the diagnosis success rate according to the test samples. The result is shown in Figure 19.

In the TEDS neural network models in Figure 19, when the number of the training samples is 500, the diagnosis success rate is measured as 98.40%. When the number of the training samples is 600, the diagnosis success rate is 97.83%. When the number of the training samples is 1200, the diagnosis success rate is 96.33%. When the number of the training samples is 2000, the diagnosis success rate is 96%. Figure 19: Graph of the diagnosis success rate according to the test samples. Figure 18: Graph of the learning time according to the training samples. CNN: convolutional neural network; LSTM: the long short-term memory models. In the CNN neural network models in Figure 19, when the number of the training samples is 500, the diagnosis success rate is measured as 95%. When the number of the training samples is 600, the diagnosis success rate is 96.67%. When the number of the training samples is 1200, the diagnosis success rate is 91%. When the number of the training samples is 2000, the diagnosis success rate is 87.5%. In the LSTM neural network models of in Figure 19, when the number of the training samples is 500, the diagnosis success rate is measured as 87.40%. When the number of the training samples is 600, the diagnosis success rate is 90.33%. When the number of the training samples is 1200, the diagnosis success rate is 92.50%.