I don’t know if there’s an existing mechanism to do this. One thing you could do to hack it together is to generate output_1 and output_2 yourself (maybe by randomly generating inputs to layer1?) and with output_1 and output_2 data you could train my_layer_2.