Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leaky_Relu in Caffe

I'm trying to use Leaky_Relu layer in caffe and can't really figure out where to define it. From the layer definitions here, I can see that ReLu has an optional parameter called negative_slope which can be used to define a leaky_relu but I can't figure out where this negative_slope parameter goes into.

The ReLu definition looks like this:

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

I tried doing this but it threw me an error:

layer {
  name: "relu1"
  type: "ReLU"
  negative_slope: 0.1
  bottom: "conv1"
  top: "conv1"
}

Any help is very much appreciated.

Thanks!

like image 976
words_of_wisdom Avatar asked Sep 02 '16 05:09

words_of_wisdom


1 Answers

As defined in the documentation, negative_slope is a parameter. And parameters are defined in the following way. Try This:

layer {
   name: "relu1"
   type: "ReLU"
   bottom: "conv1"
   top: "conv1"
   relu_param{
      negative_slope: 0.1
   }
 }
like image 127
Jayant Agrawal Avatar answered Nov 01 '22 16:11

Jayant Agrawal