Common class of Linear, Conv, etc

Hi @mhubii,

Thanks for the reply. That is really helpful. I assume paramteres() returns the layers in sequence that they are added in sequential, right?
I need weight and bias values to obtain some statistics on the weights of the network and how they change over time, something like what tensor-board provides us in python.

One more question, can I know (without checking dim()) if a tensor p is bias or weight of network? How can I get its name? And, how can I obtain the layer type, e.g. Linear, Conv2d, etc. ?
I checked named_children() and named_module() and they do not provide the name. It seems that named_parameters() has the name in p.key(), though I am note sure how I can to set the value. (I see that p.value() returns the value).
I appreciate any help or comment.

Thanks,
Afshin