TanH Layer 是DL中非线性激活的一种,在深层CNN中,中间层用得比较少,容易造成梯度消失(当然不是绝对不用);在GAN或一些网络的输出层常用到
首先我们先看一下 TanHParameter
message TanHParameter {
enum Engine {
DEFAULT = 0;
CAFFE = 1;
CUDNN = 2;
}
optional Engine engine = 1 [default = DEFAULT];
}
TanH Layer 在prototxt里面的书写:
layer {
name: "tanh"
type: "TanH"
bottom: "conv/bn"
top: "conv/bn"
}