Skip to content

Commit

Permalink
convert onnx Flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 15, 2018
1 parent 0ca92de commit bbe044f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/onnx/onnx2ncnn.cpp
Expand Up @@ -556,6 +556,10 @@ int main(int argc, char** argv)
{
fprintf(pp, "%-16s", "UnaryOp");
}
else if (op == "Flatten")
{
fprintf(pp, "%-16s", "Flatten");
}
else if (op == "Floor")
{
fprintf(pp, "%-16s", "UnaryOp");
Expand Down Expand Up @@ -1081,6 +1085,14 @@ int main(int argc, char** argv)
int op_type = 7;
fprintf(pp, " 0=%d", op_type);
}
else if (op == "Flatten")
{
int axis = get_node_attr_i(node, "axis", 1);
if (axis != 1)
{
fprintf(stderr, "Unsupported Flatten axis %d!\n", axis);
}
}
else if (op == "Floor")
{
int op_type = 2;
Expand Down

0 comments on commit bbe044f

Please sign in to comment.