Yes.  The parameters you set requires_grad to False on are leaf variables anyway; you don’t have to backpropagate through them to get to the variables you want grads for.  It is still a good idea to set requires_grad to False though, so that they don’t needlessly accumulate grads.