I have defined a simple NN as follows in Pytorch:
my_model = nn.Sequential(
nn.Linear(1, 5),
nn.Tanh(),
nn.Linear(5, 1))
I then iterate through the parameters and check their sizes:
[parameter.shape for parameter in my_model.parameters()]
I get:
[torch.Size([5, 1]), torch.Size([5]), torch.Size([1, 5]), torch.Size([1])]
I'm confused as to why the last Size is 1. Shouldn't there be 5 bias values as well, going out from the hidden layer into the output layer?