Requires_grad directly after .detach()

Answering my own question: The snippet is within a loop, at the end of the iteration. So I assume it’s purpose is to only back-propagate through one iteration of the loop and not all of them at once.