It is observed that high classification performances are achieved by using deep neural networks (DNNs). In this context, most researchers have employed these networks for the classification of hyperspectral images (HSIs). In HSI classification by the 2D/3D CNN, sub-windows with sizes larger than 11´11 are generally formed to move the filters of the CNNs. Thus, researchers turned to use spatial and spectral features jointly. The combination of spectral and spatial features causes some problems. Because the spatial resolution is not good in HSIs, these images usually do not contain strong textural information. In fact, the features that do not contribute significantly cause scattering of feature vectors in the input space. Another problem is that the training set implicitly includes data of the test set because of using sub-windows with sizes larger than 11´11, and high sampling rates. So, instead of using 2D/3D CNNs, we propose to use a novel 1D-DNN and train it by the Walsh functions. An average accuracy of 97% is achieved by using only the spectral data with one dimension and the novel 1D-DNN structure for the Indian Pines, Salinas, Pavia Centre, Pavia University and Botswana datasets. We have also investigated whether adding spatial data to the spectral data causes scattering in the input space, and calculated the percentage of the overlaps of the training and test sets with 11´11 sub-windows for less than 5% sampling rates.