Skip to content

why use .detach() here #44

@hzhz2020

Description

@hzhz2020

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()?

targets_u = targets_u.detach()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions