| 79 | } |
| 80 | |
| 81 | void TensorStatistic::resetDistribution() { |
| 82 | auto maxValue = std::max(fabsf(mRange.second), fabsf(mRange.first)); |
| 83 | mValid = maxValue > 0.00001f; |
| 84 | mInterval = 0.0f; |
| 85 | if (mValid) { |
| 86 | mInterval = (float)mBinNumber / maxValue; |
| 87 | } |
| 88 | std::fill(mDistribution.begin(), mDistribution.end(), 1.0e-07); |
| 89 | // MNN_PRINT("==> %s max: %f\n", mName.c_str(),std::max(fabsf(mRangePerChannel[0].second), |
| 90 | // fabsf(mRangePerChannel[0].first))); |
| 91 | } |
| 92 | void TensorStatistic::updateDistribution() { |
| 93 | if (mUpdatedDistributionFlag) { |
| 94 | return; |
no test coverage detected