Yeah, backprop works, but some python code won’t compile. In your (contrived) case,  tensor(…).requires_grad_(True) would compile, but you don’t usually need to be explicit about requires_grad, as it propagates with operations, and there is also .detach().