Browse Source

fix onnx2ncnn adaptive pool conversion bug, remove no used weights node (#2570)

tags/20210124
Guoxia Wang GitHub 5 years ago
parent
commit
13d0bfcfd0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions
  1. +1
    -1
      src/layer/arm/pooling_arm.cpp
  2. +7
    -0
      tools/onnx/onnx2ncnn.cpp

+ 1
- 1
src/layer/arm/pooling_arm.cpp View File

@@ -42,7 +42,7 @@ Pooling_arm::Pooling_arm()
support_bf16_storage = true;
}

int Pooling_arm::create_pipeline(const Option& _opt)
int Pooling_arm::create_pipeline(const Option& /*opt*/)
{
if (adaptive_pooling)
{


+ 7
- 0
tools/onnx/onnx2ncnn.cpp View File

@@ -2270,6 +2270,13 @@ int main(int argc, char** argv)
node_reference[node.input(1)] -= 1;
}
}
else if (op == "adaptive_avg_pool2d" || op == "adaptive_max_pool2d")
{
if (node.input_size() >= 2)
{
node_reference[node.input(1)] -= 1;
}
}
}

// for (auto a: node_reference)


Loading…
Cancel
Save