I’m unsure why you are manipulating the parameters manually, if your are already using an optimizer, but this would at least explain why this operation could fail (as said before, the optimizer would just skip it).
Your code snippet works using this simple example:
net_model = nn.Linear(1, 1)
loss_fn = nn.MSELoss()
inputs = torch.randn(1, 1)
targets = torch.randn(1, 1)

optimizer = torch.optim.SGD(net_model.parameters(), lr=1e-3)

y_pred=net_model(inputs)
loss=loss_fn(y_pred, targets)

optimizer.zero_grad()
loss.backward()
optimizer.step()
alpha = 0.1         
with torch.no_grad():
    counter=0
    for param in net_model.parameters():
        param-=alpha*param.grad

so could you post an executable code snippet to debug the issue?