C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

concat_layer_backward_types.h
1 /* file: concat_layer_backward_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the backward concat layer
19 //--
20 */
21 
22 #ifndef __CONCAT_LAYER_BACKWARD_TYPES_H__
23 #define __CONCAT_LAYER_BACKWARD_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/tensor.h"
27 #include "data_management/data/homogen_tensor.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/neural_networks/layers/layer_backward_types.h"
30 #include "algorithms/neural_networks/layers/concat/concat_layer_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace neural_networks
37 {
38 namespace layers
39 {
43 namespace concat
44 {
54 namespace backward
55 {
59 namespace interface1
60 {
61 
66 class DAAL_EXPORT Input : public layers::backward::Input
67 {
68 public:
69  typedef layers::backward::Input super;
71  Input();
72 
74  Input(const Input& other);
75 
76  virtual ~Input() {}
77 
81  using layers::backward::Input::get;
82 
86  using layers::backward::Input::set;
87 
93  data_management::NumericTablePtr get(layers::concat::LayerDataId id) const;
94 
100  void set(layers::concat::LayerDataId id, const data_management::NumericTablePtr &value);
101 
109  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
110 };
111 
116 class DAAL_EXPORT Result : public layers::backward::Result
117 {
118 public:
119  DECLARE_SERIALIZABLE_CAST(Result);
121  Result();
122  virtual ~Result() {};
123 
127  using layers::backward::Result::get;
128 
132  using layers::backward::Result::set;
133 
140  data_management::TensorPtr get(layers::backward::ResultLayerDataId id, size_t index) const;
141 
148  void set(layers::backward::ResultLayerDataId id, const data_management::TensorPtr &value, size_t index);
149 
155  virtual data_management::TensorPtr getGradient(size_t index) const DAAL_C11_OVERRIDE;
156 
165  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
166 
175  template <typename algorithmFPType>
176  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
177 
182  virtual LayerResultLayout getLayout() const DAAL_C11_OVERRIDE;
183 
184 protected:
186  template<typename Archive, bool onDeserialize>
187  services::Status serialImpl(Archive *arch)
188  {
189  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
190  }
191 
192  size_t getElem(data_management::NumericTablePtr nt, size_t index) const;
193 };
194 typedef services::SharedPtr<Result> ResultPtr;
195 
196 } // namespace interface1
197 using interface1::Input;
198 using interface1::Result;
199 using interface1::ResultPtr;
200 } // namespace backward
201 
203 } // namespace concat
204 } // namespace layers
205 } // namespace neural_networks
206 } // namespace algorithm
207 } // namespace daal
208 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::concat::backward::interface1::Input
Input parameters for the backward concat layer
Definition: concat_layer_backward_types.h:66
daal_defines.h
daal::algorithms::neural_networks::layers::backward::ResultLayerDataId
ResultLayerDataId
Definition: layer_backward_types.h:94
daal::algorithms::neural_networks::layers::concat::backward::interface1::Result
Provides methods to access the result obtained with the compute() method of the backward concat layer...
Definition: concat_layer_backward_types.h:116
daal::algorithms::neural_networks::layers::LayerResultLayout
LayerResultLayout
Definition: layer_types.h:68
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::concat::LayerDataId
LayerDataId
Identifiers of input objects for the backward concat layer and results for the forward concat layer...
Definition: concat_layer_types.h:64

For more complete information about compiler optimizations, see our Optimization Notice.