Good catch!
It’s the in-place operation label.data.fill_(fake_label) that breaks the real part sub-graph.
Adding the link for reference.
https://pytorch.org/docs/stable/notes/autograd.html#in-place-operations-with-autograd 128