Weighted loss to encoder

I have 1 encoder and 2 decoder i want to give weighted loss to encoder, meaning the decoders will be trained from their respective loss, but while going in to the encoder, their will be some weight-age to both the decoder losses. How can i implement the weighted back propagation for this setup?