can u pls tell me how to set requires_grad = False or True depending on the layer name of the model.
i know that the following code sets all the parameters to False or True
for param in model.parameters():
param.requires_grad = False
i want to set requires_grad based on the layer name…
how can that be done.