I would like to fit parameters of a custom model using the optimizers in pytorch. For example, say I have a model function yi=F(Xi, beta) where Xi is my input array (37x4) and beta is the parameter array. How can use the stochastic gradient descent algorithm to perform regression analysis using a dataset.
I would recommend that you work through some of the pytorch tutorials, perhaps
starting with this one. Pay attention to its section on autograd and then go through this section to see how to use stochastic gradient descent (optim.SGD) to fit a
parametrized function to some data by optimizing its parameters.