Browse Source

do not print relu negative slope if it is zero

tags/20171225
nihuini 8 years ago
parent
commit
96aa5d61af
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      tools/caffe/caffe2ncnn.cpp

+ 4
- 1
tools/caffe/caffe2ncnn.cpp View File

@@ -932,7 +932,10 @@ int main(int argc, char** argv)
else if (layer.type() == "ReLU")
{
const caffe::ReLUParameter& relu_param = layer.relu_param();
fprintf(pp, " 0=%f", relu_param.negative_slope());
if (relu_param.has_negative_slope())
{
fprintf(pp, " 0=%f", relu_param.negative_slope());
}
}
else if (layer.type() == "Reshape")
{


Loading…
Cancel
Save