softmax代码

def softmax(x):
  e_x = np.exp(x - np.max(x))
  return e_x / e_x.sum(axis=0)

posted @ 2019-07-24 16:29  初学者ww  阅读(196)  评论(0)    收藏  举报