Accurate photovoltaic (PV) power prediction is of great significance for the stable operation of PV system, but the PV power sequence is nonstationary, so it is difficult to establish the prediction model effectively by a simple neural network. In this study, the MCVMD‐MI‐SWATS‐Codec (multidimensional constraints variational mode decomposition‐mixed initialization‐switching from Adam to stochastic gradient descent‐codec) that is based on the idea of deep model fusion is proposed to predict PV power generation. MCVMD method with parameter K determined by multidimensional constraint criterion is used to decompose the PV power data, and the frequency of each component sequence is analyzed after decomposition to explore the physical characteristics and application value of each component frequency. Then, a hybrid ResNet‐LSTM (residual network‐long‐ and short‐term memory) model based on codec mechanism integrates input data with different dimensions, such as weather conditions and historical IMF (intrinsic mode function), into dense vectors with the same dimension. The experimental data of polysilicon PV array in the Australian desert environment are used to test the proposed fusion neural network model and the other six competitive models. The results show that MCVMD algorithm is significantly helpful in decomposing the nonstationary data to improve the prediction accuracy, and MCVMD‐MI‐SWATS‐Codec model has high prediction accuracy and robustness in both stable and unstable weather conditions.