how to access value of a learned parameter of an activation function in a sequential network
I am implementing my custom activation function with learnable parameters. For example this can be similar to PReLu https://pytorch.org/docs/stable/generated/torch.nn.PReLU.html which a learnable parameter a.
How can I access/view the a parameter value after training ?
Solution the issue was related to the fact that it was a sequential network and this helped solve the issue https://discuss.pytorch.org/t/access-weights-of-a-specific-module-in-nn-sequential/3627

The nn.PReLU layer is a nn.Module, like most other layers you can access the weights directly using the weight property.
&gt;&gt;&gt; act = nn.PReLU()
&gt;&gt;&gt; act.weight
Parameter containing:
tensor([0.2500], requires_grad=True)

