I want to achieve the function as:
output = modelA(input)
loss = loss_function(output, label)
calculate gradient and update params on ModelB
modelA and modelB have the same architecture.
Can I solve this? and how.