In view of the problem that manual selection of hyperparameters may lead to low performance and large consumption of manpower cost of the convolutional neural network (CNN), this paper proposes a nonlinear convergence factor and weight cooperative self-mapping chaos optimization algorithm (WOACW) to optimize the hyperparameters in the identification and classification model of rice leaf disease images, such as learning rate, training batch size, convolution kernel size and convolution kernel number. Firstly, the opposition-based learning is added to the whale population initialization with improving the diversity of population initialization. Then the algorithm improves the convergence factor, increases the weight coefficient, and calculates the self-mapping chaos. It makes the algorithm have a strong ability to find optimization in the early stage of iteration and fast convergence rate. And disturbance is carried out to avoid falling into local optimal solution in the late stage of iteration. Next, a polynomial mutation operator is introduced to correct the current optimal solution with a small probability, so that a better solution can be obtained in each iteration, thereby enhancing the optimization performance of the multimodal objective function. Finally, eight optimized performance benchmark functions are selected to evaluate the performance of the algorithm, the experiment results show that the proposed WOACW outperforms than 5 other common improved whale optimization algorithms. The WOACW_SimpleNet is used to identify rice leaf diseases (rice blast, bacterial leaf blight, brown spot disease, sheath blight and tungro disease), and the experiment results show that the identification average recognition accuracy rate reaches 99.35%, and the F1-score reaches 99.36%.