blob: aca68312bc8c4fab69a577b54f021e05732aa94f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
//
// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
# pragma once
#include <string>
#include <map>
#include "ArmnnNetworkExecutor.hpp"
namespace kws
{
/**
* @brief Decodes quantised last layer of model output
*
*/
class Decoder
{
private:
int quantisationOffset;
float quantisationScale;
public:
Decoder(int quantisationOffset, float quantisationScale) : quantisationOffset(quantisationOffset),
quantisationScale(quantisationScale) {}
std::pair<int, float> decodeOutput(std::vector<int8_t>& modelOutput);
};
} // namespace kws
|