What do you mean by break the backprop ? This equation itself will work good provided you handle the dimensions well. loss.backward () will be applied on a graph. This three models are part of the graph