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

pooling2d_layer_forward_types.h
1 /* file: pooling2d_layer_forward_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 forward 2D pooling layer types.
19 //--
20 */
21 
22 #ifndef __POOLING2D_LAYER_FORWARD_TYPES_H__
23 #define __POOLING2D_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/homogen_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/pooling2d/pooling2d_layer_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace neural_networks
38 {
39 namespace layers
40 {
41 namespace pooling2d
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;
70  Input();
71 
73  Input(const Input& other);
74 
75  virtual ~Input() {}
76 
81  virtual const services::Collection<size_t> getWeightsSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
82 
87  virtual const services::Collection<size_t> getBiasesSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
88 
96  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
97 };
98 
99 
105 class DAAL_EXPORT Result : public layers::forward::Result
106 {
107 public:
109  Result();
110  virtual ~Result() {}
111 
116  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
117  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
126  template <typename algorithmFPType>
127  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
128 
137  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
138 
139 protected:
140  size_t computeValueDimension(size_t dataDim, size_t kernelSize, size_t padding, size_t stride) const;
141 
142  void computeValueDimensions(services::Collection<size_t> &dims, const Parameter *param) const;
143 
144  data_management::NumericTablePtr createAuxInputDimensions(const services::Collection<size_t> &dataDims) const;
145 };
146 
147 } // namespace interface1
148 using interface1::Input;
149 using interface1::Result;
150 
151 } // namespace forward
153 } // namespace pooling2d
154 } // namespace layers
155 } // namespace neural_networks
156 } // namespace algorithm
157 } // namespace daal
158 
159 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::pooling2d::forward::interface1::Result
Provides methods to access the result obtained with the compute() method of the forward 2D pooling la...
Definition: pooling2d_layer_forward_types.h:105
daal_defines.h
daal::algorithms::neural_networks::layers::pooling2d::forward::interface1::Input
Input objects for the forward 2D pooling layer
Definition: pooling2d_layer_forward_types.h:63

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