Train one model with another pre trained model

Hi all,
I’m wondering how to train a model with another pre-trained model.

Say I have a pre-trained model (model2) which takes input as the shape of (batch, 365, 15), and I have another model (model1) generate the output as (batch, 1, 3). I wanna use these outputs to serve as the input to my pre-trained model. What is the proper way to concatenate the inputs to my pre-trained model? Now I have zero gradients with the following code.

out = model_1(someinputs)
input[:, :1, 0] = out[:, :, 0]
input[:, :1, 5] = out[:, :, 1]
input[:, :1, 10] = out[:, :, 2]
y_hat = model_2(input)
calculate loss
gradient turns None.

I’m feeling this is not a proper code but could someone suggest a better method?
Thank you all.