Hi ,
The linear layer is actually a matrix(n_feature x n_hidden1), is not a vector. I show below how I can stop training of W[0,0].
model.hidden1.weight[0, 0].requires_grad = False

Likewise, you can make other weights to False if you do not want to learn them.
EDIT: Frank pointed a mistake in this solution. requires_grad can only be applied for a whole tensor, not on an individual element.
Thanks