# Deep Learning Entrusted to Fog Nodes (DLEFN) Based Smart Agriculture
## 5 Performance Evaluation  
### Experimental Environment and Scenarios  
Initially, we chose a DL framework called Caffe [21] (convolutional architecture for fast feature embedding), which has modularity and fast speed, for the experiment. Caffe was first developed by [PERSON] and, currently, hundreds of developers are involved in development of this open-source framework in github. The CNN (convolutional neural network) architecture in Caffe begins with an input layer followed by convolution (CONV) and pooling (POOL) layers, and terminating in fully connected (FC) layers as shown in Figure 7. The convolution layer computes dots between the input image and the entries of the filter that extend to the full depth to the image, and the pooling layer progressively reduces the spatial size of the representation. ReLU is most popular activation function, which transforms the weighted sum. The CONV, POOL and ReLU layers perform a role as learnable features extractor. On the other hands, the FC layers perform a role as a machine learning classifier.  
After choosing Caffe for the simulation, we defined several custom models by revising the setting parameters of CNN models offered by Caffe offers and set up the solver parameters to optimize the models. After the definition of models and solver, all models were trained for the prepared data. Subsequently, we collected web images from Google, ImageNet, and Pixabay via a web-crawling method, and then executed custom models on the images to predict the outcomes. In this execution, we gathered operational information about required computational loads and data reduction ratios for each layer of all models. The information was utilized as reference in order to imitate the operation of DL layers in the simulation. Figure 8 illustrates the procedures used for definition of DL custom models and gathering operational information of the defined models.  
The performances of the proposed DLEFN algorithms were evaluated by simulators built based on the above operational information. The computing performance for each fog node was defined as 290-750 Gflops, in accordance with the Tegra model of NVIDIA(r). Allowed bandwidth for each fog node was restricted up to 10 Mbps, 100 Mbps, or 1 Gbps. The compulsory minimum layer was defined as 2 for all fog nodes, based on a pretested best value. An application consisted of one to four DL tasks that generated 5 MB to 150 MB per second and required a delay smaller than 200 ms. The proposed DLEFN was evaluated and compared with Li's offline and online scheme and methods supported by cloud only or by assigning two layers for all tasks. In this experiment, 500 applications requiring DL was used in random order. In addition, experiments with 30, 40, 50, 60, and 70 fog nodes were carried out to investigate the influence of the number of allowed DL applications in relation to number of fog nodes.  
Figure 8: Definition of DL custom models and gathering operational information of defined models. (**a**) A procedure for definition of DL custom models. (**b**) A procedure for gathering operational information of defined models.  
Figure 7: Example of convolutional neural network architecture.