aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/QuantizerVisitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/QuantizerVisitor.cpp')
-rw-r--r--src/armnn/QuantizerVisitor.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/armnn/QuantizerVisitor.cpp b/src/armnn/QuantizerVisitor.cpp
index 850a3c1fae..8e3265fb75 100644
--- a/src/armnn/QuantizerVisitor.cpp
+++ b/src/armnn/QuantizerVisitor.cpp
@@ -44,7 +44,7 @@ void QuantizerVisitor::SetQuantizedInputConnections(const IConnectableLayer* src
newOutputSlot.Connect(newInputSlot);
// Fetch the min/max ranges that were computed earlier
- auto range = m_Ranges.GetRange(layerToFind.GetGuid(), i);
+ auto range = m_Ranges.GetRange(layerToFind.GetGuid(), slotIdx);
auto qParams = ComputeQAsymmParams(8, range.first, range.second);
// Set the quantization params
@@ -242,4 +242,15 @@ void QuantizerVisitor::VisitSoftmaxLayer(const IConnectableLayer* layer,
SetQuantizedInputConnections(layer, newLayer);
}
+void QuantizerVisitor::VisitConstantLayer(const IConnectableLayer* layer,
+ const ConstTensor& input,
+ const char* name)
+{
+ std::vector<uint8_t> inputBacking;
+ ConstTensor qInput = CreateQuantizedConst(input, inputBacking);
+
+ IConnectableLayer* newLayer = m_QuantizedNetwork->AddConstantLayer(qInput, name);
+ RecordLayer(layer, newLayer);
+}
+
} //namespace armnn