giagrad.nn.Module.parameters#
- Module.parameters() List[Tensor] [source]#
Returns an iterator over all submodules and self parameters.
This is typically passed to an optimizer.
Examples
Using class Model defined in
Module
example.>>> for p in model.parameters(): ... print(type(p), p.shape) <class 'giagrad.tensor.Tensor'> (100, 784) <class 'giagrad.tensor.Tensor'> (100,) <class 'giagrad.tensor.Tensor'> (10, 100) <class 'giagrad.tensor.Tensor'> (10,)