Skip to content

Commit

Permalink
fix reduction fp16 exceed on android (#1819)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanrui1sensetime committed Mar 1, 2023
1 parent 29b29ee commit 84a289f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions csrc/mmdeploy/backend_ops/ncnn/onnx2ncnn/onnx2ncnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,8 @@ int main(int argc, char** argv) {
}
fprintf(pp, " 4=%d", keepdims);
fprintf(pp, " 5=1");
// Force set Reduction for FP32, FP16 may exceed for some models.
fprintf(pp, " 31=15");
} else if (op == "Reorg") {
int stride = get_node_attr_i(node, "stride", 1);
fprintf(pp, " 0=%d", stride);
Expand Down

0 comments on commit 84a289f

Please sign in to comment.