ArmNN  NotReleased
SplitterLayer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
13 class SplitterLayer : public LayerWithParameters<ViewsDescriptor>
14 {
15 public:
20  virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
21 
27  //virtual void CreateTensorHandles(Graph& graph, const IWorkloadFactory& factory) override;
28  virtual void CreateTensorHandles(const TensorHandleFactoryRegistry& registry,
29  const IWorkloadFactory& factory,
30  const bool IsMemoryManaged = true) override;
31 
34  SplitterLayer* Clone(Graph& graph) const override;
35 
38  void ValidateTensorShapesFromInputs() override;
39 
44  std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override;
45 
46  void Accept(ILayerVisitor& visitor) const override;
47 
48 protected:
52  SplitterLayer(const ViewsDescriptor& param, const char* name);
53 
55  ~SplitterLayer() = default;
56 
57 private:
58  template <typename FactoryType>
59  void CreateTensors(const FactoryType& factory);
60 };
61 
62 } // namespace
void ValidateTensorShapesFromInputs() override
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
void Accept(ILayerVisitor &visitor) const override
virtual void CreateTensorHandles(const TensorHandleFactoryRegistry &registry, const IWorkloadFactory &factory, const bool IsMemoryManaged=true) override
SplitterLayer * Clone(Graph &graph) const override
A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
~SplitterLayer()=default
Default destructor.
This layer represents a split operation.
ClWorkloadFactory FactoryType
SplitterLayer(const ViewsDescriptor &param, const char *name)