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

lrn_layer_forward_types.h
1 /* file: lrn_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 response normalization layer types.
19 //--
20 */
21 
22 #ifndef __LRN_LAYER_FORWARD_TYPES_H__
23 #define __LRN_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 "data_management/data/numeric_table.h"
29 #include "services/daal_defines.h"
30 #include "algorithms/neural_networks/layers/layer_forward_types.h"
31 #include "algorithms/neural_networks/layers/lrn/lrn_layer_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace neural_networks
38 {
39 namespace layers
40 {
41 namespace lrn
42 {
52 namespace forward
53 {
57 namespace interface1
58 {
63 class DAAL_EXPORT Input : public layers::forward::Input
64 {
65 public:
66  typedef layers::forward::Input super;
68  Input();
69 
71  Input(const Input& other);
72 
76  using layers::forward::Input::get;
77 
81  using layers::forward::Input::set;
82 
87  virtual const services::Collection<size_t> getWeightsSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
88 
93  virtual const services::Collection<size_t> getBiasesSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
94 
95  virtual ~Input() {}
96 };
97 
103 class DAAL_EXPORT Result : public layers::forward::Result
104 {
105 public:
106  DECLARE_SERIALIZABLE_CAST(Result);
108  Result();
109  virtual ~Result() {};
110 
114  using layers::forward::Result::get;
115 
119  using layers::forward::Result::set;
120 
126  data_management::TensorPtr get(LayerDataId id) const;
127 
133  void set(LayerDataId id, const data_management::TensorPtr &value);
134 
143  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
144 
149  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
150  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
151 
160  template <typename algorithmFPType>
161  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
162 
169  virtual services::Status setResultForBackward(const daal::algorithms::Input *input) DAAL_C11_OVERRIDE;
170 
171 protected:
173  template<typename Archive, bool onDeserialize>
174  services::Status serialImpl(Archive *arch)
175  {
176  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
177  }
178 };
179 typedef services::SharedPtr<Result> ResultPtr;
180 
181 } // namespace interface1
182 using interface1::Input;
183 using interface1::Result;
184 using interface1::ResultPtr;
185 } // namespace forward
187 } // namespace lrn
188 } // namespace layers
189 } // namespace neural_networks
190 } // namespace algorithm
191 } // namespace daal
192 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::lrn::forward::interface1::Input
Input parameters for the forward local response normalization layer
Definition: lrn_layer_forward_types.h:63
daal_defines.h
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::lrn::forward::interface1::Result
Provides methods to access the result obtained with the compute() method of the forward local respons...
Definition: lrn_layer_forward_types.h:103
daal::algorithms::neural_networks::layers::lrn::LayerDataId
LayerDataId
Identifiers of input objects for the backward stage and results for the forward stage of the local re...
Definition: lrn_layer_types.h:61

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