23 template <
typename CollectionType>
24 bool AreEqual(
const CollectionType& lhs,
const CollectionType& rhs)
26 if (lhs.size() != rhs.size())
31 auto lhs_it = std::find_if(lhs.begin(), lhs.end(), [&rhs](
auto& item)
33 return std::find(rhs.begin(), rhs.end(), item) == rhs.end();
36 return lhs_it == lhs.end();
40 template <
typename CollectionType>
41 bool Contains(
const CollectionType& collection,
const typename CollectionType::value_type& item)
43 return std::find(collection.begin(), collection.end(), item) != collection.end();
47 template <
typename MapType>
48 bool Contains(
const MapType& map,
const typename MapType::key_type& key)
50 return map.find(key) != map.end();
53 template <
typename ConvolutionLayer>
56 layer->m_Weight = std::make_unique<armnn::ScopedCpuTensorHandle>(weightInfo);
57 layer->m_Bias = std::make_unique<armnn::ScopedCpuTensorHandle>(biasInfo);
59 layer->m_Weight->Allocate();
60 layer->m_Bias->Allocate();
74 unsigned int channels,
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
armnn::SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(armnn::SubgraphView::InputSlots &&inputs, armnn::SubgraphView::OutputSlots &&outputs, armnn::SubgraphView::Layers &&layers)
armnn::IBackendInternalUniquePtr CreateBackendObject(const armnn::BackendId &backendId)
std::list< Layer * > Layers
bool AreEqual(const CollectionType &lhs, const CollectionType &rhs)
void SetWeightAndBias(ConvolutionLayer *layer, const armnn::TensorInfo &weightInfo, const armnn::TensorInfo &biasInfo)
std::vector< InputSlot * > InputSlots
armnn::TensorShape MakeTensorShape(unsigned int batches, unsigned int channels, unsigned int height, unsigned int width, armnn::DataLayout layout)
armnn::SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< armnn::Layer *> &layers)
std::unique_ptr< SubgraphView > SubgraphViewPtr
std::vector< OutputSlot * > OutputSlots
bool Contains(const CollectionType &collection, const typename CollectionType::value_type &item)
armnn::SubgraphView::InputSlots CreateInputsFrom(const std::vector< armnn::Layer *> &layers)