I have network A and B.
the architecture is like this
x->A->A(x)->B->B(A(x))
input is x, first get A(x) then send to B get B(A(x))
the loss function is computed as a function of loss(B(A(x)), A(x))
The parameter in B is not allowed to do derivative
in pytorch, if i first do (say predict is A(x)
new_predict = Variable(predict.data, requires_grad=False)
then send new_predict to B, then do loss.back()
it kind of works
but, if i don’t do that, the learning just failed
Wonder why
Thanks