###### Abstract
In recent years, spectroscopy and hyperspectral imaging have been recognized as useful tools for classifying the internal and external properties of biological products. For example, [PERSON] et al. [10] detected early the nitrogen in cucumber plants using hyperspectral images. They captured hyperspectral images of the leaves with excess and standard amount of nitrogen for several consecutive days in laboratory. The results showed that the visible and near-infrared (Vis/NIR) hyperspectral imaging technique was able to early detect plants with excess of nitrogen at a rate of 96.11%. [PERSON] et al. [11] analyzed hyperspectral data from mature leaves of tea plants by partial least squares-discriminant analysis (PLS-DA) and least squares-support vector machines (LS-SVM) to classify different nitrogen status. The results showed that the LS-SVM model was more able to predict different rates of nitrogen with an accuracy of 82%. Currently, deep learning (DL) models are an extremely active area of research and they are applied in many domains, such as is in this study. They are taught using large labeled datasets and neural network structures that directly characterize features. So, they are trained without the need to extract the features manually. One of the most popular types of DL models are convolutional neural networks (CNN or ConvNet). Automatic feature extraction in CNNs makes them practical and attractive for computer vision tasks such as object detection and segmentation. A CNN learns to recognize different features of an image using up to hundreds of hidden layers. They were introduced in 1990, inspired by experiments performed by [PERSON] and [PERSON] [12] on the visual cortex. The uses of CNN have grown so rapidly that, in a short time, they have revolutionized many areas of computer vision, such as human action detection, object detection, face detection and tracking. In this regard, [PERSON] et al. [13] conducted a review of traditional machine learning and deep learning methods, including AlexNet, VGG Net and fully convolutional networks (FCN). According to their declaration, despite the success of the machine vision methods, they will have low accuracy if the background is too noisy, or the lighting conditions are poor, since they will not be able to detect small changes in the food. [PERSON] et al. [14] used a CNN for studying deficiencies on plants considering different nutrients, such as Ca, Fe, K, Mg and N. A dataset consisting of 3000 leaf images was analyzed. The results indicated that the proposed method is superior to trained humans in the detection of nutrient deficiency. The CNN classifier had an accuracy of 94%. [PERSON] et al. [15] aimed to use fine-tuning, instead of ImageNet, in pre-trained CNN in order to improve the obtained performance. Experimental results showed that the overall performance can be increased by the proposed method. Some structures, such as Xception and Inception-Resnet, improved it by 0.51% and 1.89%, respectively. Comparing machine learning with DL, [PERSON] et al. [16] stated that DL has been analyzed and implemented in various applications and has shown remarkable results, thus they need to be explored more broadly, since they can also be useful in most fields. [PERSON] et al. [17] categorized hyperspectral images using long short-term memory (LSTM). Specifically, for each pixel, they fed spectral values one by one in different LSTM channels to train spectral properties. Principal component analysis (PCA) was used first to extract the first components of a hyperspectral image, and then local patches were selected. The row vectors of each patch are then transferred to the LSTM to determine the spatial properties of the central pixel. Then, in the classifier step, the spectral and spatial properties of the pixels are fed into soft-max classifiers, to obtain two different results. A strategy for decision fusion was used to obtain more spatial-spectral results. [PERSON] et al. [18] estimated soluble solids in apples using spectral data and DL.