forked from mindspore-Ecosystem/mindspore
fix bug of compute activation range
This commit is contained in:
parent
d0d5a8b878
commit
4c54ae189d
|
@ -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, ¶_.min_, ¶_.max_);
|
||||
CalculateActivationRangeQuantized(act == ActType_Relu, act == ActType_Relu6, para_.out_zp_,
|
||||
static_cast<float>(out_scale), ¶_.min_, ¶_.max_);
|
||||
|
||||
if (!InferShapeDone()) {
|
||||
return RET_OK;
|
||||
|
|
Loading…
Reference in New Issue