14 auto& ranges = m_GuidToRangesMap[layer->
GetGuid()];
18 if (numOfOutputSlots == 0)
22 if (ranges.size() < numOfOutputSlots)
24 ranges.resize(numOfOutputSlots);
26 ranges[outputIdx] = std::make_pair(min, max);
31 auto search = m_GuidToRangesMap.find(guid);
32 if (search == m_GuidToRangesMap.end())
36 throw armnn::Exception(
"Have no entry for layer GUID [" + std::to_string(guid) +
"]");
40 return DefaultRange();
43 return search->second.at(idx);
48 auto& currentMin = m_GuidToRangesMap.find(guid)->second.at(idx).first;
49 if (newMin < currentMin)
57 auto& currentMax = m_GuidToRangesMap.find(guid)->second.at(idx).second;
58 if (newMax > currentMax)
66 auto minMaxPair = m_GuidToRangesMap.find(guid);
67 auto& currentMin = minMaxPair->second.at(idx).first;
68 auto& currentMax = minMaxPair->second.at(idx).second;
76 m_GuidToRangesMap.clear();
virtual unsigned int GetNumOutputSlots() const =0
Returns the number of connectable output slots.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
bool IsInDynamicMode() const
void ResetMinMax(LayerGuid guid, unsigned int idx, float newMin, float newMax)
Overwrite min and max in RangeTracker with newMin and newMax.
void RefineMax(LayerGuid guid, unsigned int slotIndex, float newMax)
Update max in RangeTracker with new_max if it is greater than current value.
Copyright (c) 2020 ARM Limited.
std::pair< float, float > MinMaxRange
MinMaxRange GetRange(LayerGuid guid, unsigned int idx) const
Retrieve the Range for a particular output slot on a particular layer.
void SetRange(const IConnectableLayer *layer, unsigned int outputIdx, float min, float max)
Set the range for an output slot on a layer.
virtual LayerGuid GetGuid() const =0
Returns the unique id of the layer.
Base class for all ArmNN exceptions so that users can filter to just those.
void RefineMin(LayerGuid guid, unsigned int slotIndex, float newMin)
Update min in RangeTracker with new_min if it is lower than current value.