Training model for another model

I want to use one model output as the parameters of another model, how can I do it?
When doing something like:
It doesn’t really work.
Cannot do the backward.
Assume that x1 is the output of another model.
Thanks a lot in advance

Do you mean you would like to use one mode as a feature extractor?

not really. Specifically, I want to take one model’s output say model A, and use it as the parameter of one layer in another model. But I want to update this layer following the model A. Any idea?

Sorry, I want to be 100% certain.

You want to extract the output of layer N in model A.
Take that output and feed it into model B, BUT continue training model A?

yes, I want to feed it such that this output is basically the parameters of some layer in model A