Daniel_Dagnino:

However, still I have the doubt whether is possible to cancel the gradient for one specific weight inside a FC layer


I got your confusion. The question this thread 56 discussed is similar to you.
What you want is to set slices of layer.weight.requires_grad=False, I think it should be done manually as mentioned in the link above.
And for .data, we can use with torch.no_grad(): to avoid the unsafe mode.