Skip to content

Commit

Permalink
more init style compability
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 6, 2018
1 parent b48ec83 commit a6679ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/mxnet/mxnet2ncnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ std::vector<float> MXNetNode::weight(int i, int init_len) const

if (!p.init.empty() && init_len != 0)
{
if (p.init == "[\\$zero\\$, {}]" || p.init == "[\\\"zero\\\", {}]")
if (p.init == "[\\$zero\\$, {}]" || p.init == "[\\\"zero\\\", {}]" || p.init == "zeros")
{
data.resize(init_len, 0.f);
}
else if (p.init == "[\\$one\\$, {}]" || p.init == "[\\\"one\\\", {}]")
else if (p.init == "[\\$one\\$, {}]" || p.init == "[\\\"one\\\", {}]" || p.init == "ones")
{
data.resize(init_len, 1.f);
}
Expand Down

0 comments on commit a6679ed

Please sign in to comment.