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