I\'ve been trying to code a program that uses the softmax activation function in the middle.
Right now, I have a list of probabilities like this:
P[0
Hmm interesting, how about...
Generate a number between 0 and 1.
Walk the list substracting the probability of each item from your number.
Pick the item that, after substraction, took your number down to 0 or below.
That's simple, O(n) and should work :)