Concept

Connection between the Layers of Neural Network

In the chain structure of a feedforward network, Let's assume the input example is xRdx \in \mathbb{R}^d, then the first layer is given by h(1)=g(1)(W(1)Tx+b(1))h^{(1)} = g^{(1)} (W^{(1)T}x + b^{(1)}) the second layer is given by h(2)=g(2)(W(2)Th(1)+b(2))h^{(2)} = g^{(2)} (W^{(2)T} h^{(1)}+ b^{(2)}) and so on. For the output layer, y^=g(n)(W(n)Th(n1)+b(n))\hat{y} = g^{(n)}(W^{(n)T} h^{(n-1)}+ b^{(n)})

where the matrix W(k)Rd×hkW^{(k)}\in \mathbb{R}^{d\times h_k} is the weight parameter for layer kk and gkg^{k} is the activation function for layer kk. Whether transposing W(k)W^{(k)} depends on the shape of the vector.

Image 0

0

1

Updated 2025-08-31

References


Tags

Data Science