3 ms·
Well, if they gave you the formula for softmax, it shouldn't take more than a minute to implement it: import numpy as np def softmax(x): return np.exp(x)/np.s
by p1esk 10y ago
Well, if they gave you the formula for softmax, it shouldn't take more than a minute to implement it:
import numpy as np
def softmax(x): return np.exp(x)/np.sum(np.exp(x))
where x is an array of numbers.