Skip to content

Commit

Permalink
fix leakyrelu with default type
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Nov 28, 2018
1 parent a941701 commit d9d7d6b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/mxnet/mxnet2ncnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ int main(int argc, char** argv)
if (n.op == "_contrib_MultiBoxDetection")
{
// reorder input blob
int temp = inputs[0];
inputs[0] = inputs[1];
inputs[1] = temp;
int temp = n.inputs[0];
n.inputs[0] = n.inputs[1];
n.inputs[1] = temp;
}

// input
Expand Down Expand Up @@ -1081,7 +1081,7 @@ int main(int argc, char** argv)
{
fprintf(pp, "%-16s", "ELU");
}
else if (type == "leaky")
else if (type == "leaky" || type.empty())
{
fprintf(pp, "%-16s", "ReLU");
}
Expand Down Expand Up @@ -1801,7 +1801,7 @@ int main(int argc, char** argv)
float slope = n.has_attr("slope") ? n.attr("slope") : 0.25f;
fprintf(pp, " 0=%f", slope);
}
else if (type == "leaky")
else if (type == "leaky" || type.empty())
{
float slope = n.has_attr("slope") ? n.attr("slope") : 0.25f;
fprintf(pp, " 0=%f", slope);
Expand Down

0 comments on commit d9d7d6b

Please sign in to comment.