Settings

Theme

Why is x an array in the softmax function?

2 points by jakeDevelops 3 years ago · 1 comment · 1 min read


Sorry if this sounds dumb, I'm new to ML. So basically, if the softmax function is "e ^ (x - max(x)) / sum(e^(x - max(x))", I understand what e is, but then what's x? I keep seeing people make x an array, but shouldn't it just be a single number or float? Isn't that what the output would be of the summation formula? Thanks.

sashank_1509 3 years ago

This is better answered in stack overflow but x is an array. I think a better written string is e ^ (x_i - max(x)) / sum_i(e^(x_i - max(x))" x_i is a specific element in the array x. Basically an array of real values is converted to an array of 0 to 1, with one corresponding to the largest element in x

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection