ArmNN
 23.08
ChannelShuffleLayer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 class ChannelShuffleLayer : public LayerWithParameters<ChannelShuffleDescriptor>
12 {
13 public:
14 
15  /// Creates a dynamically-allocated copy of this layer.
16  /// @param graph The graph into which this layer is being cloned
17  ChannelShuffleLayer* Clone(Graph& graph) const override;
18 
19  /// Makes a workload for the ChannelShuffle type.
20  /// @param factory The workload factory which will create the workload
21  /// @return A pointer to the created workload, or nullptr if not created.
22  virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
23 
24  /// Check if the input tensor shape(s)
25  /// will lead to a valid configuration of @ref ChannelShuffleLayer.
26  /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.
27  void ValidateTensorShapesFromInputs() override;
28 
29 protected:
30  ChannelShuffleLayer(const ChannelShuffleDescriptor& param, const char* name);
31 
32  ~ChannelShuffleLayer() = default;
33 };
34 
35 } // namespace
armnn::ChannelShuffleLayer::CreateWorkload
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the ChannelShuffle type.
Definition: ChannelShuffleLayer.cpp:22
armnn::ChannelShuffleLayer::Clone
ChannelShuffleLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
Definition: ChannelShuffleLayer.cpp:30
armnn::ChannelShuffleDescriptor
A ChannelShuffleDescriptor for the ChannelShuffle operator.
Definition: Descriptors.hpp:1541
armnn::LayerWithParameters
Definition: LayerWithParameters.hpp:14
armnn::ChannelShuffleLayer::ValidateTensorShapesFromInputs
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of ChannelShuffleLayer.
Definition: ChannelShuffleLayer.cpp:35
armnn::ChannelShuffleLayer
Definition: ChannelShuffleLayer.hpp:11
armnn::ChannelShuffleLayer::~ChannelShuffleLayer
~ChannelShuffleLayer()=default
armnn::IWorkloadFactory
Definition: WorkloadFactory.hpp:22
LayerWithParameters.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
armnn::ChannelShuffleLayer::ChannelShuffleLayer
ChannelShuffleLayer(const ChannelShuffleDescriptor &param, const char *name)
Definition: ChannelShuffleLayer.cpp:17
armnn::Graph
Definition: Graph.hpp:30