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

lcn_layer_forward_types.h
1 /* file: lcn_layer_forward_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 forward local contrast normalization layer.
19 //--
20 */
21 
22 #ifndef __LCN_LAYER_FORWARD_TYPES_H__
23 #define __LCN_LAYER_FORWARD_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_forward_types.h"
30 #include "algorithms/neural_networks/layers/lcn/lcn_layer_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace neural_networks
37 {
38 namespace layers
39 {
40 namespace lcn
41 {
51 namespace forward
52 {
56 namespace interface1
57 {
58 
63 class DAAL_EXPORT Input : public layers::forward::Input
64 {
65 public:
66  typedef layers::forward::Input super;
70  Input();
71 
73  Input(const Input& other);
74 
75  virtual ~Input() {}
76 
80  using layers::forward::Input::set;
84  using layers::forward::Input::get;
85 
90  virtual const services::Collection<size_t> getWeightsSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
91 
96  virtual const services::Collection<size_t> getBiasesSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
97 
105  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
106 };
107 
113 class DAAL_EXPORT Result : public layers::forward::Result
114 {
115 public:
116  DECLARE_SERIALIZABLE_CAST(Result);
120  Result();
121 
122  virtual ~Result() {}
123 
127  using layers::forward::Result::get;
128 
132  using layers::forward::Result::set;
133 
138  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
139  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
140 
149  template <typename algorithmFPType>
150  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
151 
157  data_management::TensorPtr get(LayerDataId id) const;
158 
164  void set(LayerDataId id, const data_management::TensorPtr &value);
165 
174  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
175 
176 protected:
177  void getSigmaDimensions(const Input *in, const Parameter *algParameter, services::Collection<size_t> &sigmaDims) const;
178  void getCDimensions(const Input *in, const Parameter *algParameter, services::Collection<size_t> &cDims) const;
179 
181  template<typename Archive, bool onDeserialize>
182  services::Status serialImpl(Archive *arch)
183  {
184  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
185  }
186 };
187 typedef services::SharedPtr<Result> ResultPtr;
188 
189 } // namespace interface1
190 using interface1::Input;
191 using interface1::Result;
192 using interface1::ResultPtr;
193 
194 } // namespace forward
196 } // namespace lcn
197 } // namespace layers
198 } // namespace neural_networks
199 } // namespace algorithms
200 } // namespace daal
201 
202 #endif
daal
Definition: algorithm_base_common.h:31
daal_defines.h
daal::algorithms::neural_networks::layers::lcn::forward::interface1::Result
Results obtained with the compute() method of the forward local contrast normalization layer in the b...
Definition: lcn_layer_forward_types.h:113
daal::algorithms::neural_networks::layers::lcn::LayerDataId
LayerDataId
Definition: lcn_layer_types.h:63
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::lcn::forward::interface1::Input
Input objects for the forward local contrast normalization layer
Definition: lcn_layer_forward_types.h:63

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