How detach() affect to the model?

Network flow:
[Model_1] -> [Model_2] -> [Model_3]

optimizer1 = {Model_1 + Model_2}
optimizer2 = {Model_3}

When I train with optimizer2,
If I don’t use detach() to input of model_3, this can affect to Model_1 and Model2 ???
Model_3(input.detach()) or Model_3(input)

it depends on were input comes from. If input is the output of another model it will break backprop . If it’s just a tensor nothing happens.

Copied from this topic.