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 LayerGuid GetGuid() const =0
std::pair< float, float > MinMaxRange
void RefineMax(LayerGuid guid, unsigned int slotIndex, float newMax)
Update max in RangeTracker with new_max if it is greater than current value.
virtual unsigned int GetNumOutputSlots() const =0
void RefineMin(LayerGuid guid, unsigned int slotIndex, float newMin)
Update min in RangeTracker with new_min if it is lower than current value.
bool IsInDynamicMode() const
Base class for all ArmNN exceptions so that users can filter to just those.
void SetRange(const IConnectableLayer *layer, unsigned int outputIdx, float min, float max)
Set the range for an output slot on a layer.
MinMaxRange GetRange(LayerGuid guid, unsigned int idx) const
Retrieve the Range for a particular output slot on a particular layer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
void ResetMinMax(LayerGuid guid, unsigned int idx, float newMin, float newMax)
Overwrite min and max in RangeTracker with newMin and newMax.