4
$\begingroup$

Im reading this paper momentarily, and in it (section 2.1.) the predicted output $\hat{\textbf{y}}$ of a single hidden layer neural network is given by

\begin{align} \hat{\textbf{y}} = \sigma(\textbf{x}\textbf{W}_1)+b)\textbf{W}_2, \end{align}

where $\textbf{x}$ is the input vector, $\textbf{W}_1,\textbf{W}_2$ the corresponding weight matrices and $b$ the bias weights.

Two questions arise for me:

  1. Why isn't the activation function applied to the output layer, as in

\begin{align} \hat{\textbf{y}} = \sigma(\sigma(\textbf{x}\textbf{W}_1)+b)\textbf{W}_2) \end{align}

  1. Why isn't a bias weight added to the output layer, as in

\begin{align} \hat{\textbf{y}} = \sigma(\textbf{x}\textbf{W}_1)+b_1)\textbf{W}_2 + b_2 \end{align}

Any intuition about this?

Happy weekend, cheers

$\endgroup$

2 Answers 2

3
$\begingroup$
  1. If the target is not constrained, e.g. such as probability values, the final activation is typically dropped.

  2. As per with note (2) in the paper, they assume centred target values:

Note that we omit the outer-most bias term as this is equivalent to centring the output

$\endgroup$
1
  • 1
    $\begingroup$ thanks for your quick and helpful reply friend, I missed that note :) Cheers $\endgroup$
    – MJimitater
    Commented Jun 13, 2020 at 10:38
3
$\begingroup$

On p. 2 they write that to use this model for regression they use squared loss, so no activation is needed, while for classification it is passed through softmax function and use cross-entropy loss.

$\endgroup$
1
  • 1
    $\begingroup$ thanks for your reply friend! So it seems like that there is simply no activation function on the model output (for regression), as the numerical values are compared with the squared loss and thus probability values are not needed here. Thanks! $\endgroup$
    – MJimitater
    Commented Jun 13, 2020 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.