Skip to content

Commit

Permalink
fix relu6 bug in QuantizationOptimizer.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxianzhi authored Aug 25, 2024
1 parent 31044be commit fafe6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_tools/include/OPOptimizers/QuantizationOptimizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class QuantizationOptimizer : public OPOptimizer {

bool isNotNaiveRelu(OperatorSpec *op)
{
return ((op->type == OT_Relu) && (op->ps.relu_spec.neg_slope != 0));
return ((op->type == OT_Relu && op->ps.relu_spec.neg_slope != 0) || op->type == OT_Relu6);
}

bool isAvgPooling(OperatorSpec *op)
Expand Down

0 comments on commit fafe6c8

Please sign in to comment.