No, you cant have it inside your graph and expect it to be tuned.
If you followed the first PyTorch tutorials at https://pytorch.org/tutorials/ 154 , you must’ve learned the concept of an optimizer, and how it does the optimization step (which will tune the weights). You have to give these variables to an optimizer, to tune them.
The default model parameters are given to it with model.parameters() call. I suggest you do the tutorial again to get a better understanding.