20.11
QuantizationInput.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#pragma once
7
8
#include <map>
9
#include <
armnn/Types.hpp
>
10
#include <
armnnQuantizer/INetworkQuantizer.hpp
>
11
12
namespace
armnnQuantizer
13
{
14
15
/// QuantizationInput for specific pass ID, can list a corresponding raw data file for each LayerBindingId.
16
class
QuantizationInput
17
{
18
public
:
19
20
/// Constructor for QuantizationInput
21
QuantizationInput
(
const
unsigned
int
passId,
22
const
armnn::LayerBindingId
bindingId,
23
const
std::string fileName);
24
25
QuantizationInput
(
const
QuantizationInput
& other);
26
27
// Add binding ID to image tensor filepath entry
28
void
AddEntry
(
const
armnn::LayerBindingId
bindingId,
const
std::string fileName);
29
30
// Retrieve tensor data for entry with provided binding ID
31
std::vector<float>
GetDataForEntry
(
const
armnn::LayerBindingId
bindingId)
const
;
32
33
/// Retrieve Layer Binding IDs for this QuantizationInput.
34
std::vector<armnn::LayerBindingId>
GetLayerBindingIds
()
const
;
35
36
/// Get number of inputs for this QuantizationInput.
37
unsigned
long
GetNumberOfInputs
()
const
;
38
39
/// Retrieve Pass ID for this QuantizationInput.
40
unsigned
int
GetPassId
()
const
;
41
42
/// Retrieve filename path for specified Layer Binding ID.
43
std::string
GetFileName
(
const
armnn::LayerBindingId
bindingId)
const
;
44
45
/// Destructor
46
~QuantizationInput
() noexcept;
47
48
private
:
49
unsigned
int
m_PassId;
50
std::map<armnn::LayerBindingId, std::string> m_LayerBindingIdToFileName;
51
52
};
53
54
}
armnnQuantizer::QuantizationInput::QuantizationInput
QuantizationInput(const unsigned int passId, const armnn::LayerBindingId bindingId, const std::string fileName)
Constructor for QuantizationInput.
Definition:
QuantizationInput.cpp:16
armnnQuantizer::QuantizationInput::AddEntry
void AddEntry(const armnn::LayerBindingId bindingId, const std::string fileName)
Definition:
QuantizationInput.cpp:35
armnnQuantizer::QuantizationInput
QuantizationInput for specific pass ID, can list a corresponding raw data file for each LayerBindingI...
Definition:
QuantizationInput.hpp:16
armnnQuantizer::QuantizationInput::~QuantizationInput
~QuantizationInput() noexcept
Destructor.
Definition:
QuantizationInput.cpp:99
armnnQuantizer::QuantizationInput::GetDataForEntry
std::vector< float > GetDataForEntry(const armnn::LayerBindingId bindingId) const
Definition:
QuantizationInput.cpp:40
armnn::LayerBindingId
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
Definition:
Types.hpp:202
Types.hpp
armnnQuantizer::QuantizationInput::GetLayerBindingIds
std::vector< armnn::LayerBindingId > GetLayerBindingIds() const
Retrieve Layer Binding IDs for this QuantizationInput.
Definition:
QuantizationInput.cpp:65
armnnQuantizer
Definition:
CommandLineProcessor.cpp:11
armnnQuantizer::QuantizationInput::GetNumberOfInputs
unsigned long GetNumberOfInputs() const
Get number of inputs for this QuantizationInput.
Definition:
QuantizationInput.cpp:76
armnnQuantizer::QuantizationInput::GetFileName
std::string GetFileName(const armnn::LayerBindingId bindingId) const
Retrieve filename path for specified Layer Binding ID.
Definition:
QuantizationInput.cpp:86
armnnQuantizer::QuantizationInput::GetPassId
unsigned int GetPassId() const
Retrieve Pass ID for this QuantizationInput.
Definition:
QuantizationInput.cpp:81
INetworkQuantizer.hpp
src
armnnQuantizer
QuantizationInput.hpp
Generated on Wed Nov 25 2020 09:59:11 for ArmNN by
1.8.13