10 using namespace armnn;
13 std::vector<unsigned int> ignoreSlots)
18 if (std::find(ignoreSlots.begin(), ignoreSlots.end(), it->GetSlotIndex()) != ignoreSlots.end())
24 result.push_back(&(*it));
32 std::vector<unsigned int> ignoreSlots)
35 for (
auto&& layer: layers)
37 for (
auto&& it = layer->BeginInputSlots(); it != layer->EndInputSlots(); ++it)
39 if (std::find(ignoreSlots.begin(), ignoreSlots.end(), it->GetSlotIndex()) != ignoreSlots.end())
45 result.push_back(&(*it));
55 for (
auto && layer : layers)
57 for (
auto&& it = layer->BeginOutputSlots(); it != layer->EndOutputSlots(); ++it)
59 result.push_back(&(*it));
69 return std::make_unique<SubgraphView>(std::move(inputs), std::move(outputs), std::move(layers));
75 auto backendFactory = backendRegistry.GetFactory(backendId);
76 auto backendObjPtr = backendFactory();
82 unsigned int channels,
87 using namespace armnn;
91 return TensorShape{ batches, channels, height, width };
93 return TensorShape{ batches, height, width, channels };
SubgraphView::InputSlots CreateInputsFrom(Layer *layer, std::vector< unsigned int > ignoreSlots)
SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer * > &layers)
SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)
armnn::TensorShape MakeTensorShape(unsigned int batches, unsigned int channels, unsigned int height, unsigned int width, armnn::DataLayout layout)
armnn::IBackendInternalUniquePtr CreateBackendObject(const armnn::BackendId &backendId)
std::vector< InputSlot >::iterator EndInputSlots()
std::vector< InputSlot >::iterator BeginInputSlots()
std::vector< InputSlot * > InputSlots
std::list< Layer * > Layers
std::vector< OutputSlot * > OutputSlots
std::shared_ptr< SubgraphView > SubgraphViewPtr
Copyright (c) 2021 ARM Limited and Contributors.
BackendRegistry & BackendRegistryInstance()
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
constexpr const char * GetDataLayoutName(DataLayout dataLayout)