One more question,
If I define std::vector<torch::nn::Linear> linear_layers; and fill this vector with some torch::nn::Linear, then I can access the weight and bias values by linear_layers[k].weight and linear_layers[k].bias. Same feature is available with other layer types, e.g., torch::nn::Conv2d.
Now, my question is how can I access the weight and bias values of each layer when I have used nn::sequential?
Thanks,
Afshin