Skip to content

Commit

Permalink
improve accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjing.lh committed Apr 7, 2020
1 parent e1a57bc commit 9e72839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relay/qnn/op/add.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ Expr QnnAddCanonicalize(const Attrs& attrs, const Array<Expr>& new_args,
auto requantized_lhs = Requantize(args.lhs, input_type.shape,
real_lhs_scale, args.lhs_zero_point,
itmd_out_scale, itmd_zero_point,
DataType::Int(32));
DataType::Int(32), rounding);

auto requantized_rhs = Requantize(args.rhs, input_type.shape,
real_rhs_scale, args.rhs_zero_point,
itmd_out_scale, itmd_zero_point,
DataType::Int(32));
DataType::Int(32), rounding);

output = Add(requantized_lhs, requantized_rhs);
output = Requantize(output, input_type.shape,
Expand Down

0 comments on commit 9e72839

Please sign in to comment.