@@ -21,10 +21,10 @@ void XLULayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
2121 const Dtype* bottom_data = bottom[0 ]->cpu_data ();
2222 Dtype* top_data = top[0 ]->mutable_cpu_data ();
2323 const int count = bottom[0 ]->count ();
24- Dtype negative_slope = this ->layer_param_ .relu_param ().negative_slope ();
25- Dtype relu6 = this ->layer_param_ .relu_param ().relu6 (); // CUSTOMIZATION
26- Dtype maximum = this ->layer_param_ .relu_param ().maximum (); // CUSTOMIZATION
27- Dtype minimum = this ->layer_param_ .relu_param ().minimum (); // CUSTOMIZATION
24+ Dtype negative_slope = this ->layer_param_ .xlu_param ().negative_slope ();
25+ Dtype relu6 = this ->layer_param_ .xlu_param ().relu6 (); // CUSTOMIZATION
26+ Dtype maximum = this ->layer_param_ .xlu_param ().maximum (); // CUSTOMIZATION
27+ Dtype minimum = this ->layer_param_ .xlu_param ().minimum (); // CUSTOMIZATION
2828 if (bottom.size () > 1 ) // bottom[1] provides the maximum case
2929 maximum = bottom[1 ]->cpu_data ()[0 ];
3030 for (int i = 0 ; i < count; ++i) {
@@ -50,10 +50,10 @@ void XLULayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
5050 const Dtype* top_diff = top[0 ]->cpu_diff ();
5151 Dtype* bottom_diff = bottom[0 ]->mutable_cpu_diff ();
5252 const int count = bottom[0 ]->count ();
53- Dtype negative_slope = this ->layer_param_ .relu_param ().negative_slope ();
54- Dtype relu6 = this ->layer_param_ .relu_param ().relu6 (); // CUSTOMIZATION
55- Dtype maximum = this ->layer_param_ .relu_param ().maximum (); // CUSTOMIZATION
56- Dtype minimum = this ->layer_param_ .relu_param ().minimum (); // CUSTOMIZATION
53+ Dtype negative_slope = this ->layer_param_ .xlu_param ().negative_slope ();
54+ Dtype relu6 = this ->layer_param_ .xlu_param ().relu6 (); // CUSTOMIZATION
55+ Dtype maximum = this ->layer_param_ .xlu_param ().maximum (); // CUSTOMIZATION
56+ Dtype minimum = this ->layer_param_ .xlu_param ().minimum (); // CUSTOMIZATION
5757 if (bottom.size () > 1 ) // bottom[1] provides the maximum case
5858 maximum = bottom[1 ]->cpu_data ()[0 ];
5959 for (int i = 0 ; i < count; ++i) {
@@ -70,10 +70,6 @@ void XLULayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
7070}
7171
7272
73- #ifdef CPU_ONLY
74- STUB_GPU (XLULayer);
75- #endif
76-
7773INSTANTIATE_CLASS (XLULayer);
7874REGISTER_LAYER_CLASS (XLU);
7975
0 commit comments