[CPP Speech Sample] Fix result saving when batch size is not 1 (#10714)
* Fix result saving when batch size is not 1 * Remove useless if statement * improved processing scores for model with more than one outputs * added checking on count of model outputs * improve if statements * divide fix for model with several outputs to other PR Co-authored-by: Maxim Gordeev <maxim.gordeev@intel.com>
This commit is contained in:
parent
7e8bbf4968
commit
c28cebb2a6
@ -494,9 +494,9 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
if (!FLAGS_o.empty()) {
|
||||
/* Prepare output data for save to file in future */
|
||||
auto outputFrame =
|
||||
&vectorPtrScores[next_output].front() +
|
||||
numScoresPerOutput[next_output] * sizeof(float) * (inferRequest.frameIndex);
|
||||
auto outputFrame = &vectorPtrScores[next_output].front() +
|
||||
numScoresPerOutput[next_output] * sizeof(float) *
|
||||
(inferRequest.frameIndex) / batchSize;
|
||||
|
||||
ov::Tensor outputBlob =
|
||||
inferRequest.inferRequest.get_tensor(executableNet.output(outputName));
|
||||
@ -653,7 +653,7 @@ int main(int argc, char* argv[]) {
|
||||
uttName,
|
||||
&vectorPtrScores[next_output].front(),
|
||||
numFramesFile,
|
||||
numScoresPerOutput[next_output]);
|
||||
numScoresPerOutput[next_output] / batchSize);
|
||||
}
|
||||
if (!FLAGS_r.empty()) {
|
||||
// print statistical score error
|
||||
|
Loading…
Reference in New Issue
Block a user