# 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
In Figure 14 the OSFG fragmented 446,110-628,115 messages and in Figure 15, transferred 326,954-461,935 messages of them. Therefore, the message transmission rate of the OSFG was 73.5% and was improved by about 7% compared with the existing gateway. Therefore, the reason why this experiment result was improved is because the OSFG used the compression and fragmentation technique applied to headers. If the headers are used, a bigger payload can be stored in a fragment. As the size of the field that can store a payload gets larger, the message is fragmented into a smaller number of fragments and is processed faster. Figure 10:4 The number of data fragmentation times in the OFSG. Figure 10:5 Data transmission quantity in the OFSG. ### The Analysis of the CSM Performance

To analyze the performance of the CSM, the APDS and the TEDS should be simulated beforehand. If the number of the APDS's hidden layers gets larger, this paper measures the number of repeated learning times and the accuracy of the APDS. If different activation functions are used, this paper measures the accuracy of a neural network model. In addition, this paper analyzes the learning speed and reliability of each neural network model by comparing the proposed TEDS neural network model, long short-term memory (LSTM) neural network model and convolutional neural network (CNN) neural network model. The Server PC using the GeForce GTX 1080 CPU and the Client PC transferring sensor data are used for the simulation environment. #### 4.2.1 The Analysis of the APDS Performance

To analyze the APDS performance, the initial weight, the initial learning rate, and the learning reduction rate of each algorithm that a developer should set at the initial learning stage are used as control variables. Table 1 shows the control variables to analyze the APDS performance. Figure 16 shows the average repeated learning times and the average error rate according to the number of hidden layers of the six neural network models of the APDS. In case there is no hidden layer, the APDS neural network models learn fastest when the number of average repeated learning times is 100, but they do not classify data when an error rate is 52.9%. In case there isone1 hidden layer, the APDS neural network models show that the number of average repeated learning times is 249 and the error rate is 3.1%. In case there are six hidden layers, the APDS neural network models show that the number of average repeated learning times is 898 and the error rate is 2.8%. In case there are hidden layers in the APDS neural network models, the error rate is about 0.5%. However, because the average repeated learning times are increased in proportion to the number of hidden layers, the APDS neural network models have to use just one hidden layer. \begin{table}
\begin{tabular}{c c} \hline \hline
**Control Variable** & **Value** \\ \hline Learning Rate & 0.01 \\ Weight (all) & 0.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The control variables to analyze the agricultural partial diagnosis sub-module (APDS) performance. Figure 16: The average repeated learning times and the average error rate of neural network models. Figure 17 shows the accuracy according to test data when the APDS neural network models that used one hidden layer use the Sigmoid function and a tanh function as an activation function. When a Sigmoid function was used as an activation function and the number of test samples was 500, the accuracy was measured as 99.97%. When the number of test samples was 700, the accuracy was measured as 96%. When the number of test samples was 1200, the accuracy was measured as 92.587%. Finally, when the number of test samples was 2000, the accuracy was measured as 91.337%. When a rectified linear unit (ReLU) function was used as an activation function and the number of test samples was 500, the accuracy was measured as 95.1%. When the number of test samples was 700, the accuracy was measured as 94.89%. When the number of test samples was 1200, the accuracy was measured as 91.73%.