[Intro to Deep Learning with PyTorch -- L2 -- N15] Softmax function

Posted answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Intro to Deep Learning with PyTorch -- L2 -- N15] Softmax function相关的知识,希望对你有一定的参考价值。

The Softmax Function

In the next video, we‘ll learn about the softmax function, which is the equivalent of the sigmoid activation function, but when the problem has 3 or more classes.

 技术图片
 
技术图片
 
import numpy as np

def softmax(L):
    expL = np.exp(L)
    sumExpL = sum(expL)
    result = []
    for i in expL:
      result.append(i*1.0/sumExpL)

    return result

 

以上是关于[Intro to Deep Learning with PyTorch -- L2 -- N15] Softmax function的主要内容,如果未能解决你的问题,请参考以下文章

[Intro to Deep Learning with PyTorch -- L2 -- N15] Softmax function

[Intro to Deep Learning with PyTorch -- L2 -- N20] Cross-Entropy

[Intro to Deep Learning with PyTorch -- L2 -- N14] Sigmoid function

Intro to Machine Learning

How To Improve Deep Learning Performance

deep learning入门:感知机