2016-09-02 29 views
5

我正嘗試在caffe中使用Leaky_Relu層,並且無法真正弄清楚在哪裏定義它。從層定義here中,我可以看到ReLu有一個可選參數,稱爲negative_slope,可用於定義leaky_relu,但我無法確定negative_slope參數的位置。Caffe中的Leaky_Relu

的RELU定義是這樣的:

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

我想這樣做,但它扔我一個錯誤:

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

任何幫助是非常讚賞。

謝謝!

回答

8

如文檔中所定義,negative_slope是一個參數。參數按以下方式定義。試試這個:

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