Browse Source

add size 0 case in outlier post quant

tags/v1.1.0
guohongzilong 5 years ago
parent
commit
9eb7a3a6e5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc

+ 1
- 1
mindspore/lite/tools/converter/quantizer/post_training_quantizer.cc View File

@@ -100,7 +100,7 @@ STATUS DivergInfo::ComputeThreshold() {
return RET_OK;
}

if (method_x == kMethodOutlier) {
if (method_x == kMethodOutlier && this->min_datas.size() > 0) {
this->percent_result = OutlierMethod(min_datas, max_datas);
this->best_T = std::max(std::fabs(percent_result.first), std::fabs(percent_result.second));
return RET_OK;


Loading…
Cancel
Save