您当前的位置: 首页 >  ar

段智华

暂无认证

  • 2浏览

    0关注

    1232博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Pytorch 学习(7):Pytorch中的Non-linear Activations (非线性层)实现

段智华 发布时间:2018-09-12 12:48:45 ,浏览量:2

Pytorch 学习(7):Pytorch中的Non-linear Activations (非线性层)实现

Pytorch中的Non-linear Activations (非线性层)包括以下激活函数:

  • ReLU
  • ReLU6
  • ELU
  • SELU
  • PReLU
  • LeakyReLU
  • Threshold
  • Hardtanh
  • Sigmoid
  • Tanh
  • LogSigmoid
  • Softplus
  • Softshrink
  • Softsign
  • Tanhshrink
  • Softmin
  • Softmax
  • Softmax2d
  • LogSoftmax

Pytorch各激活函数的Python前端代码在activation.py中:

 

 查看一下ReLU的python源码:


class ReLU(Threshold):
    r"""Applies the rectified linear unit function element-wise
    :math:`\text{ReLU}(x)= \max(0, x)`

    .. image:: scripts/activation_images/ReLU.pn
关注
打赏
1659361485
查看更多评论
立即登录/注册

微信扫码登录

0.1253s