In recent years, deep distributed neural networks (DDNNs) and neural networks (NN) have excelled in an extensive list of applications. For example, deep convolutional neural networks (DCNNs) are constantly gaining new features in various tasks in computer vision. At the same time, the number of end devices, including Internet of Things (IoT) devices has increased prominently. These devices are attractive targets for machine learning applications because they are often directly connected to sensors. For example (cameras, microphones, and gyroscopes) that record large amounts of input data in a stream mode. This study presents the design of a DDNN with end devices, edges, and clouds that spans computer hierarchies. The idea presented is considered one of the new ideas because it depends on two layers to distinguish, namely the convolutional layer and the pooling layer. The main objective behind using these two layers in one proposal is to provide and obtain the best results. Finally, we discovered that the proposed technique produced the best results in terms of accuracy and cost, with the precision of the definition reaching 99 % and the cost being quite affordable at 25. As a result, we conclude that these results are far superior to those achieved by the researchers in their ideas provided in previous recent literature.