ArmNN
 22.11
ChannelShuffleLayer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 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  // TODO Do you need to create an InferOutputShapes function for ChannelShuffle?
30 protected:
31  ChannelShuffleLayer(const ChannelShuffleDescriptor& param, const char* name);
32 
33  ~ChannelShuffleLayer() = default;
34 };
35 
36 } // namespace
ChannelShuffleLayer * Clone(Graph &graph) const override
Creates a dynamically-allocated copy of this layer.
ChannelShuffleLayer(const ChannelShuffleDescriptor &param, const char *name)
Copyright (c) 2021 ARM Limited and Contributors.
void ValidateTensorShapesFromInputs() override
Check if the input tensor shape(s) will lead to a valid configuration of ChannelShuffleLayer.
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
Makes a workload for the ChannelShuffle type.
A ChannelShuffleDescriptor for the ChannelShuffle operator.