# How does a neural network get its output?

I want to create my own neural network but I'm not grasping the concept of how the neural network gets trained/gets to an output.

Say you have the following example: link to example

As you can see in the var trainingdata there is exact data on what you want the neural network (hamster) to output.

If the machine finishes training that data, why is it that if you input:

[0, 1]

it returns:

Sit Neuron: 0.014995911436294706% Run Neuron: 99.39201708556335% Jump Neuron: 1.2615268528823826%

To my understanding it should return the following:

Sit Neuron: 0% Run Neuron: 100% Jump Neuron: 0%

Because the machine can literally compare the input [0, 1] with the trainingdata, which contains the exact output.

Why is it that the machine still considers the jump and sit to be valid?

• Questions specific to how Javascript works is off topic here. – Michael R. Chernick May 11 '17 at 15:56
• @MichaelChernick I may say this question is on topic but almost impossible to answer. – Haitao Du May 11 '17 at 16:09
• It is hard to answer since too much background information is needed. It is not a popular library / software implementation, and not a popular data set. The question is not general for other people's interest. – Haitao Du May 11 '17 at 16:11
• As you can see from the link this is done using Javascript. So I interpreted "the machine still considers the jump an sit to be valid" to refer to what the code is doing rather than something that is a property of a neural network. – Michael R. Chernick May 11 '17 at 16:14