I want to backpropagate the loss in the generator networks that produce rec_A and rec_B (the generator networks are not shown in the code for better readability).
The face_model is just used as a feature extractor and the loss is computed between the features of the face image produced from the generator, e.g. rec_A, and the features of the ground truth face image real_A.
I think the .detach() on rec_A and rec_B is wrong. However, even after removing them I still get the same error.