A hidden layer sits between input and output layers and transforms values before later computation. In a fully connected network, adding a matrix introduces a tunable hidden-layer size: the number of neurons or intermediate outputs. section 2.2.1
Each neuron receives connections from every value in the preceding layer. For example, nn.Linear(3, 4) maps three inputs to four hidden outputs, followed by nn.Linear(4, 1) for one prediction. Nonlinear activations between hidden layers let classification boundaries bend rather than remain linear. section 2.2.1 section 2.3.3
Two hidden layers in PyTorch
A compact classifier uses nn.Linear(2, 30), Tanh(), nn.Linear(30, 30), Tanh(), and nn.Linear(30, 2). Increasing the hidden layers improves confidence and produces a nonlinear separation between two classes. section 2.3.3
Figure 2.4 A simple feed-forward fully connected network with one input layer of d = 3 inputs, a hidden layers with n = 4 neurons, and one output in the output layer. Connections feed directly into the next layer only, and each node in one layer is connected to every neuron in the preceding layer.
Use the network diagram to inspect feed-forward connections, hidden neurons, and the transition from three inputs to one output. section 2.2.1







