1
$\begingroup$

I am implementing a Neural Network in a somewhat different fashion. I train my neural network locally using a small subset, and export the weights.

My goal is to test the neural network in a distributed parallel programming solution using those exported weights. This means that I have to rebuild the NN topology.

My activation function for the Hidden layer is the logistic function:

$$\frac{1}{1+e^{\theta^TX}}$$

Where $\theta$ is the weight vector and $X$ is the input vector.

Once I calculate that for the hidden layer, I don't know how to proceed to the output layer. What is the next calculation/step that I have to implement?

P.S: my network dimensions are 255-75-1.

$\endgroup$
2
  • $\begingroup$ That formula is the output for 1 hidden node. You have 75 of those at hand. Theta is different for each case. After that you plug that 75 outputs from the hidden layer to the same formula (assuming you have logistic at the output as well), again with a different theta vector. $\endgroup$ Oct 17, 2014 at 14:24
  • 1
    $\begingroup$ This question isn't answerable without know what activation you're using for the final layer. $\endgroup$
    – Sycorax
    Sep 3, 2019 at 23:27

1 Answer 1

1
$\begingroup$

If you are doing binary classification, the same exact logistic function you gave is an adequate choice for your output neuron. Just use the activation of the hidden layer as your "new $x$" instead. The value this final neuron will output should be interpreted as the probability of the input belonging or not to the class. If you have multiple classes you could instead use a softmax function, which is a generalization of the the logistic, that will output a vector with normalized probabilities for each class.

$\endgroup$

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