Is it possible to update a specific model through loss.backward?
Firstly,
output1 = model1(input1)
then, modify input1 using output1.
From now, modified input1 is called input2.
Feed input2 into model2
output2 = model2(input2)
Comput loss
loss = criterion(output2, target)
My logic is like above and I want to fix weights of model2 and update model1 using loss.
How can I do this?