MixMatch-pytorch
MixMatch-pytorch copied to clipboard
why use .detach() here
Hi
Thanks for the great repo. I'm wondering in the line below, why do we need .detach(), isn't that the targets_u is already in the scope of torch.no_grad()?
https://github.com/YU1ut/MixMatch-pytorch/blob/cc7ef42cffe61288d06eec1428268b384674009a/train.py#L235