ie_permute_layer.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 /**
6  * @file
7  */
8 
9 #pragma once
10 
12 #include <string>
13 #include <vector>
14 
15 namespace InferenceEngine {
16 namespace Builder {
17 
18 /**
19  * @deprecated Use ngraph API instead.
20  * @brief The class represents a builder for Permute layer
21  */
22 IE_SUPPRESS_DEPRECATED_START
23 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(PermuteLayer): public LayerDecorator {
24 public:
25  /**
26  * @brief The constructor creates a builder with the name
27  * @param name Layer name
28  */
29  explicit PermuteLayer(const std::string& name = "");
30  /**
31  * @brief The constructor creates a builder from generic builder
32  * @param layer pointer to generic builder
33  */
34  explicit PermuteLayer(const Layer::Ptr& layer);
35  /**
36  * @brief The constructor creates a builder from generic builder
37  * @param layer constant pointer to generic builder
38  */
39  explicit PermuteLayer(const Layer::CPtr& layer);
40  /**
41  * @brief Sets the name for the layer
42  * @param name Layer name
43  * @return reference to layer builder
44  */
45  PermuteLayer& setName(const std::string& name);
46 
47  /**
48  * @brief Returns input port
49  * @return Input port
50  */
51  const Port& getInputPort() const;
52  /**
53  * @brief Sets input port
54  * @param port Input port
55  * @return reference to layer builder
56  */
57  PermuteLayer& setInputPort(const Port& port);
58  /**
59  * @brief Returns output port
60  * @return Output port
61  */
62  const Port& getOutputPort() const;
63  /**
64  * @brief Sets output port
65  * @param port Output port
66  * @return reference to layer builder
67  */
68  PermuteLayer& setOutputPort(const Port& port);
69  /**
70  * @brief Return vector of dimensions indexes for output blob
71  * @return Order of dimensions for output blob
72  */
73  const std::vector<size_t> getOrder() const;
74  /**
75  * @brief Sets the order of dimensions for output blob
76  * @param order dimensions indexes for output blob
77  * @return reference to layer builder
78  */
79  PermuteLayer& setOrder(const std::vector<size_t>& order);
80 };
81 IE_SUPPRESS_DEPRECATED_END
82 
83 } // namespace Builder
84 } // namespace InferenceEngine
Inference Engine API.
Definition: ie_argmax_layer.hpp:15
std::shared_ptr< const Layer > CPtr
A shared pointer to the constant Layer builder.
Definition: ie_layer_builder.hpp:52
std::string name
Layer name.
Definition: ie_layers.h:42
This class defines the basic functional for layer builders.
Definition: ie_layer_decorator.hpp:26
std::shared_ptr< Layer > Ptr
A shared pointer to the Layer builder.
Definition: ie_layer_builder.hpp:48
This class is the main object to describe the Inference Engine port.
Definition: ie_network.hpp:230
The class represents a builder for Permute layer.
Definition: ie_permute_layer.hpp:23