Hi shinra!



 shinra:

If I have some easy ways to upgrade the weights in model.parameters() without using step()?


I believe the following should work:
    with torch.no_grad():
        for param in model.parameters():
            param.copy_ (param - param.grad * learning_rate)

param.copy_() changes “in place” the data stored in the parameter
referred to by param, rather than changing the variable param to
refer to something else.
Best.
K. Frank