[Python] What's the use case for `torch.randn_like` when`requires_grad=True`? [closed]

Discussão em 'Python' iniciado por Stack, Julho 18, 2025.

  1. Stack

    Stack Membro Participativo

    In PyTorch, requires_grad can be set to True in torch.randn_like, what's the use case for this?

    Say we have $\epsilon ~ N(0, I)$, to my understanding, since $\epsilon$ is not a parameter, there is no need to pipe gradient through it.

    Thanks in advance.

    Continue reading...

Compartilhe esta Página