fix bug of compute activation range

This commit is contained in:
fuzhiye 2020-11-28 19:40:16 +08:00
parent d0d5a8b878
commit 4c54ae189d
1 changed files with 2 additions and 1 deletions

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;