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

This commit is contained in:
Guoxia Wang
2021-01-07 18:58:24 +08:00
committed by GitHub
parent 8790de3507
commit 13d0bfcfd0
2 changed files with 8 additions and 1 deletions
+1 -1
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
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)