D
D
Denisca Gareev2020-05-29 19:14:23
Neural networks
Denisca Gareev, 2020-05-29 19:14:23

How is a neural network trained?

I am writing my "toy" neural network.
But I can’t understand how it is trained, how would I understand that it is back propagation of an error.
And I made this spread.
But I can't understand how to do something like this:
input: [0, 1], output: [0]
input: [1, 0], output: [1]
:'(
the output always turns out to be 1.
Please help.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
i, 2020-06-03
@ilyarsoftware

Your question is taken out of context and without a fundamental formulation of the problem it turns out to be general.
It is important to understand that even a properly built and trained network will give the probability: input: [0, 1], output: [0.11] and input: [1, 0], output: [0.99], and after applying the confidence threshold coefficient to the network response we get the expected result, for example:

parsePrediction(prediction, threshold = 0.5)  {
  if (prediction > threshold) {
    return 1
  } else {
    return 0
  }
}

Look at this implementation, of which there are really many, try to fly an alternative implementation and understanding will come.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question