Skip to content

Commit

Permalink
Merge pull request #3115 from diandianti/master
Browse files Browse the repository at this point in the history
MNN:BugFix:fix bug when use quantized.out with multi-images
  • Loading branch information
jxt1234 authored Dec 6, 2024
2 parents 98ba45b + 53d45b5 commit 2b899c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/quantization/calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ void Calibration::_quantizeModelEMA() {
auto singleInput = _Input(originDims, originFormat, originType);
auto inputTensor = (MNN::Tensor*)singleInput->getTensor();
Helper::preprocessInput(_process.get(), _preprocessConfig, file, inputTensor, _inputType, inputs[0]);
::memcpy(inputs[0]->writeMap<float>() + k * inputTensor->elementSize(), inputTensor->host<float>(), inputTensor->elementSize() * sizeof(float));
::memcpy(inputs[0]->writeMap<float>() + (k - indicesStart) * inputTensor->elementSize(), inputTensor->host<float>(), inputTensor->elementSize() * sizeof(float));

}
}
Expand Down

0 comments on commit 2b899c1

Please sign in to comment.