Python:实现Softmax 函数的实现算法
import numpy as np
def softmax(vector):
# Calculate e^x for each x in your vector where e is Euler's
# number (approximately 2.718)
exponentVector = np.exp(vector)
# Add up the all the exponentials
import numpy as np
def softmax(vector):
# Calculate e^x for each x in your vector where e is Euler's
# number (approximately 2.718)
exponentVector = np.exp(vector)
# Add up the all the exponentials