iffiX:

And @googlebot detach() is definetely inappropriate here,


Yeah, I just used that as notation for functional style equivalent. In OOP style, weight is not a function argument, so for nn.Parameters you usually disable gradient with requires_grad.