Hi, I am going through the beginners examples, and on the part of PyTorch: optim, it is not clear to me why the optimisation package receives all model parameters (including the Tensors that describe the states of the layers) instead of only the Tensors that describe the weights. Maybe I am missing a more fundamental concept, but it was my understanding that we just wanted to updated the weights.
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
Thank you!