blob: ebabdd704f32046103477032ac70a476530790e1 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <map>
#include <armnn/Types.hpp>
#include <armnn/INetworkQuantizer.hpp>
namespace armnnQuantizer
{
/// QuantizationInput for specific pass ID, can list a corresponding raw data file for each LayerBindingId.
class QuantizationInput
{
public:
/// Constructor for QuantizationInput
QuantizationInput(const unsigned int passId,
const armnn::LayerBindingId bindingId,
const std::string fileName);
QuantizationInput(const QuantizationInput& other);
// Add binding ID to image tensor filepath entry
void AddEntry(const armnn::LayerBindingId bindingId, const std::string fileName);
// Retrieve tensor data for entry with provided binding ID
std::vector<float> GetDataForEntry(const armnn::LayerBindingId bindingId) const;
/// Retrieve Layer Binding IDs for this QuantizationInput.
std::vector<armnn::LayerBindingId> GetLayerBindingIds() const;
/// Get number of inputs for this QuantizationInput.
unsigned long GetNumberOfInputs() const;
/// Retrieve Pass ID for this QuantizationInput.
unsigned int GetPassId() const;
/// Retrieve filename path for specified Layer Binding ID.
std::string GetFileName(const armnn::LayerBindingId bindingId) const;
/// Destructor
~QuantizationInput() noexcept;
private:
unsigned int m_PassId;
std::map<armnn::LayerBindingId, std::string> m_LayerBindingIdToFileName;
};
}
|