MCPcopy Create free account
hub / github.com/alibaba/MNN / resetDistribution

Method resetDistribution

tools/quantization/TensorStatistic.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void 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}
92void TensorStatistic::updateDistribution() {
93 if (mUpdatedDistributionFlag) {
94 return;

Callers 1

Calls 4

maxFunction · 0.50
fillFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected