Browse Source

fix bug of compute activation range

tags/v1.1.0
fuzhiye 5 years ago
parent
commit
4c54ae189d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/lite/src/runtime/kernel/arm/int8/add_int8.cc

+ 2
- 1
mindspore/lite/src/runtime/kernel/arm/int8/add_int8.cc View File

@@ -62,7 +62,8 @@ int QuantizedAddCPUKernel::Init() {
para_.out_left_shift_ = -para_.out_left_shift_ > 0 ? -para_.out_left_shift_ : 0;

auto act = arith_para_->activation_type_;
CalculateActivationRangeQuantized(act == ActType_Relu, act == ActType_Relu6, 0, 1, &para_.min_, &para_.max_);
CalculateActivationRangeQuantized(act == ActType_Relu, act == ActType_Relu6, para_.out_zp_,
static_cast<float>(out_scale), &para_.min_, &para_.max_);

if (!InferShapeDone()) {
return RET_OK;


Loading…
Cancel
Save