This paper uses a neural architecture search (NAS) algorithm based on Bayesian optimization (BO), a version of neural architecture search adapted for network morphism, is proposed to automatically seek an optimized cell-based architecture approximation for CNN to classify the coal and gangue. Besides, we defined the cell-based search space, which has significantly reduced arithmetic operations and computing resources with fewer parameters. In hyperparameter optimization, BO has focused on Euclidean domains that only permit tuning scalar hyper-parameters. However, when BO applies to NAS, a suitable kernel function is needed to build GP, and a distance function is required to describe the differences between two neural network architectures. We define a kernel function suitable for the search space and describe the similarity of network architecture appropriately. We also apply the particle swarm optimization algorithm to optimize the acquisition function. Network morphism is combined with Bayesian optimization (BO), so the obtained architecture inherited the knowledge of the parent network, realizing a better trade-off between exploitation and exploration. The adaptability of the GP model is enhanced by self-optimization of network architecture, and dynamic variable model super parameters gradually fit the real data distribution. We can first obtain the cell architecture from a low-resolution and small dataset and then superimpose its number to expand to a more extensive neural network architecture suitable for the feature of coal from different coal washery. The network CellNet outperforms architectures manually designed that is validated on coal and gangue classification problem.