Solved – Activation Function for First Layer Nodes in an ANN

artificial intelligenceneural networks

In an artificial neural network, neurons take inputs from their previous layer, transform this signal using an activation function (in my case, the sigmoid function), and send this transformed signal along weights to the neurons in the next layer.

enter image description here

Do first layer neurons use an activation function to process the raw data they are fed, or do they send the raw signal along weights to the next layer without any activation function?

Best Answer

To answer your question directly, the first layer is fed the raw input and weights which are then transformed via the activation function at the subsequent neurons.

The activation function is applied at each neuron not between neurons. The weights are multiplied by the prior layers outputs and summed for each neuron and then transformed via the activation function.

$Z^{(l+1)} = g(A^{(l)}\dot{}W^{(l)})$

where

$Z^{(l+1)}$ = output for next neuron layer ($l$)

$g$ = activation function

$A^{(l)}$ = previous layer data ($l$)

$W^{(l)}$ = weights for given layer