aboutsummaryrefslogtreecommitdiff
path: root/src/armnnQuantizer/QuantizationInput.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnQuantizer/QuantizationInput.hpp')
-rw-r--r--src/armnnQuantizer/QuantizationInput.hpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/armnnQuantizer/QuantizationInput.hpp b/src/armnnQuantizer/QuantizationInput.hpp
new file mode 100644
index 0000000000..ebabdd704f
--- /dev/null
+++ b/src/armnnQuantizer/QuantizationInput.hpp
@@ -0,0 +1,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;
+
+};
+
+} \ No newline at end of file