[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 63 KB, 1000x838, 1539268793783.png [View same] [iqdb] [saucenao] [google]
10589290 No.10589290 [Reply] [Original]

So I've been learning neural networks on my own but all the problems I've seen so far deal with an output layer of one or multiple binary neurons so that the output is either 0 or 1 or 00000000 or 11111111 etc and anything inbetween. But what if I would want an output that is an arbitrary long integer like 666 or 1488? Should I have an output layer with number of neurons I expect my number to be and then convert that binary number to decimal? E.g. I know the number can't be larger than 2000 (11111010000) so my output layer would have 11 binary neurons.

>> No.10589342

>>10589290
Every neuron should have a small number on it's input. (-1..+1) (maximum -10..+10)
On their output can be big number.
But I suggest you to keep the output values small, and later multiply it with 1000.

>> No.10589555

>>10589290
No what you do is use a function like softmax to squash the values of one layer to within the 0 to 1 range and then establish a dropout that turns it into a binary answer - above, let's say, 0.65 is 1, and below is 0 (for whatever reason you'd want it to be binary).
Remember, there is zero difference between having [10000, 1000, 1000] as values and [0.83, 0.083, 0.083] because the neural network doesn't "understand" the values of the neurons or weights, only the output, and everything inside works like an operation which is unaffected by scale. In fact this should be your very first layer - the conversion of those long numbers into smaller ones, as not doing it can lead you to overflows or other bullshit like negative values

>> No.10590029 [DELETED] 

>>10589290
Can you give an example of what you're doing, because your question makes absouletly no sense.

>>10589555
like this guys says. If you have categorical output, you use softmax to get a valid probability distribution, which is going to be a vector of values between 0 and 1, that sum to 1. Then you use cross entropy loss to train the network.

I have no idea what you actually mean, but if you're just doing regression, which a vector output, say you're trying to tell the price of a house and how quickly it will sell, based off a bunch of house features, you'd do the exact same thing, but you wouldnt use softmax on the output layer, and youd use something like MSE.

Can you give a concrete example of what you're doing?

>> No.10590099

>>10589290
Why can you just have one neuron = one integer?

>> No.10590437

>>10589555
you would use sigmoid for this not softmax

>> No.10590476

>>10589290
Just use a single linear unit as output and train to minimize something like mean squared error.

>> No.10590488

>>10589290
Don't waste your time on this.
It's an advance cat picture sorter, and you can't into debug it.

>> No.10590774

>>10589290
I suggest creating bus for translation and having output layer as binary stands for numbers.