So once the requires_grad have been set to True/False for the specific layers, we can simply pass the whole model in the optimizer, right?
like
optimizer = optim.Adam(model.parameters() , lr=0.1)  ???
even i all the parameters have been passed in the optimizer, only thoses parameters will get updated, which have their requires_grad set to True…
Pls correct me if i am wrong and thanks yaar, for the explanation !!!