Usage of detach()

total_loss += loss(A, B.detach())
total_loss += loss(B, A.detach())
total_loss.backward()

Hi, all

If I call B.detach() in the front, B cannot be trained after this code?

Hi,

What do you mean by “in the front” ?