Hi,


Rather than tensor, on PyTorch, variable in neural network should be auto grad just like a path based on linear algebra, tensor is just like a box, 2-rank is a matrix, 1-rank is vector. Of course parameters should be auto grad in order to update it. You can seek a chain-rule in internet.


Before answer, I would like to confirm reason why you need to optimize the “theta” ?, and what is the “theta” ? then what is “features” you mean ?