C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 3

split_layer_backward_types.h
1 /* file: split_layer_backward_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 split layer
19 //--
20 */
21 
22 #ifndef __SPLIT_LAYER_BACKWARD_TYPES_H__
23 #define __SPLIT_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/split/split_layer_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace neural_networks
37 {
38 namespace layers
39 {
43 namespace split
44 {
54 namespace backward
55 {
60 enum InputLayerDataId
61 {
62  inputGradientCollection = 1
63 };
64 
68 namespace interface1
69 {
70 
75 class DAAL_EXPORT Input : public layers::backward::Input
76 {
77 public:
79  Input();
80 
81  virtual ~Input() {}
82 
86  using layers::backward::Input::get;
87 
91  using layers::backward::Input::set;
92 
99  data_management::TensorPtr get(InputLayerDataId id, size_t index) const;
100 
106  LayerDataPtr get(InputLayerDataId id) const;
107 
114  void set(InputLayerDataId id, const data_management::TensorPtr &value, size_t index);
115 
121  void set(InputLayerDataId id, const LayerDataPtr &ptr);
122 
130  virtual services::Status addInputGradient(const data_management::TensorPtr &igTensor, size_t index) DAAL_C11_OVERRIDE;
131 
136  virtual services::Status setInputFromForward(layers::forward::ResultPtr result) DAAL_C11_OVERRIDE;
137 
145  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
146 
151  virtual LayerInputLayout getLayout() const DAAL_C11_OVERRIDE;
152 };
153 
158 class DAAL_EXPORT Result : public layers::backward::Result
159 {
160 public:
161  DECLARE_SERIALIZABLE_CAST(Result);
163  Result();
164  virtual ~Result() {};
165 
169  using layers::backward::Result::get;
170 
174  using layers::backward::Result::set;
175 
184  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
185 
194  template <typename algorithmFPType>
195  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
196 
197 protected:
199  template<typename Archive, bool onDeserialize>
200  services::Status serialImpl(Archive *arch)
201  {
202  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
203  }
204 };
205 typedef services::SharedPtr<Result> ResultPtr;
206 
207 } // namespace interface1
208 using interface1::Input;
209 using interface1::Result;
210 using interface1::ResultPtr;
211 } // namespace backward
213 } // namespace split
214 } // namespace layers
215 } // namespace neural_networks
216 } // namespace algorithm
217 } // namespace daal
218 #endif
daal::algorithms::neural_networks::layers::split::backward::inputGradientCollection
Definition: split_layer_backward_types.h:62
daal
Definition: algorithm_base_common.h:31
daal_defines.h
daal::algorithms::neural_networks::layers::split::backward::interface1::Result
Provides methods to access the result obtained with the compute() method of the backward split layer...
Definition: split_layer_backward_types.h:158
daal::algorithms::neural_networks::layers::LayerInputLayout
LayerInputLayout
Definition: layer_types.h:57
daal::algorithms::neural_networks::layers::split::backward::InputLayerDataId
InputLayerDataId
Definition: split_layer_backward_types.h:60
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::split::backward::interface1::Input
Input parameters for the backward split layer
Definition: split_layer_backward_types.h:75

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