Transform the 1-D tensor x into a probability distribution: exponentiate
each element, then divide by the sum of all the exponentials, so the outputs are
non-negative and sum to 1.
Input
tensor([1., 2., 3.])
Output
tensor([0.0900, 0.2447, 0.6652])