caffe系列之激活函数

8 篇文章 0 订阅

1、Sigmoid

layer{
    name: "encod1act"
    bottom: "encode1"
    top: "encode1neuron"
    type: "Sigmoid"
}

2、ReLU/Retified-Linear and Leaky-ReLU
可选参数:negative_slope:默认为0。对标准的ReLU函数进行变化,如果设置了这个值,那么数据为负数时,就不再设置为0,而是原始数据乘以negative_slope。

layer{
    name: "relu1"
    type: "ReLU"
    bottom: "pool1"
    top: "pool1"
}

RELU层支持in-place计算,这意味着bottom输出和输入相同以避免内存的消耗。
3、TanH/Hyperbolic Tangent

layer{
    name: "lauer"
    bottom: "input"
    top: "out"
    type: "TanH"
}

4、Absolute Value

layer{
    name: "layer"
    bottom:  "in"
    out: "out"
    type: "AbsVal"
}

5、Power
对每个输入数据进行幂运算
可选参数:
power: 默认为1
scale: 默认为1
shift: 默认为0

layer{
    name: "layer"
    bottom: "in"
    top: "out"
    type: "Power"
    power_param{
        power: 2
        scale: 1
        dhift: 0
    }
}

6、BNLL

f(x) = log(1+exp(x))

layer{
    name: "layer"
    bottom: "in"
    top: "out"
    type: "BNLL"
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值