Neural network to output non-binary values?

Recently, I have been looking at face detection, and many of the literature claims that their outputs have a range. How is this possible? I created my own network, and it looks like it only outputs -1 or 1. Is it because I use the Tanh activation function? I want the values ​​to be derived from, say, 0 to 1 in the range, and not from the binary output, so I can see how β€œstrong” it considers the output to actually be a face. Thanks.

+4
source share
3 answers

Your problem might be tanh input range. Note that the sigmoid is very similar to tanh - it can be easily overloaded with a large number. sigmoid (20) is almost equal to 1 and sigmoid (-20) is 0 First try to normalize the input layer input to have lower numbers in the hidden layer (s), as well as at the output level.

+2
source

Yes ... your activation function determines your values. If you do not put the activation function into our output neurons, then it will simply output the sum of the values ​​... this case will give you the actual error between your uneven output and the uneven expected values.

Of course, if you normalize your expected values, you can save your activation function.

0
source

Okay, so I think that it continued that the Tanh function reaches 1 too early. I have now switched to the Sigmoid activation function at the output level, and I get much more varied answers! :) Great. Thanks.

0
source

Source: https://habr.com/ru/post/1307653/


All Articles