I encountered a problem when using a convolutional neural network for training

My task contains two neural networks. There is an MLP (Multilayer Perceptron) network named Model_out in front, and its parameters are stored in: p_out, re_out = Flux.destructure(model_out), and split_i = length(p_out); the second neural network is CNN, and its structure is: model_in = Chain(Ccnv((3,), 2 => N, relu, pad = (0, 1))), and its parameters are stored in: p_in, re_in = Flux.destructure( model_out); the parameters of the two networks are merged into: p = [p_out; p_in]; in addition, our task also needs to solve the ordinary differentiation equation (ODE); there is no problem with the forward propagation, but when the ODE is solved for back propagation, An error occurred: "UndefRefError: access to undefined reference; the error is located at NN_in = re_in(p[split_i + 1: end])(inPut); I am wondering whether it is because the parameter arrangement of CNN is different from that of MLP, which caused me When using the index to call the parameter matrix p, there was an undefined reference problem. Can you give me some comments? Thanks!!