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

pooling2d_layer_backward_types.h
1 /* file: pooling2d_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 backward 2D pooling layer.
19 //--
20 */
21 
22 #ifndef __POOLING2D_LAYER_BACKWARD_TYPES_H__
23 #define __POOLING2D_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/pooling2d/pooling2d_layer_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace neural_networks
37 {
38 namespace layers
39 {
40 namespace pooling2d
41 {
51 namespace backward
52 {
53 
57 namespace interface1
58 {
63 class DAAL_EXPORT Input : public layers::backward::Input
64 {
65 public:
66  typedef layers::backward::Input super;
68  Input();
69 
71  Input(const Input& other);
72 
73  virtual ~Input() {}
74 
79  virtual services::Collection<size_t> getGradientSize() const;
80 
81 protected:
82  virtual data_management::NumericTablePtr getAuxInputDimensions() const = 0;
83 
84  virtual services::Collection<size_t> getInputGradientSize(const pooling2d::Parameter *parameter) const;
85 
86  size_t computeInputDimension(size_t maskDim, size_t kernelSize, size_t padding, size_t stride) const;
87 };
88 
94 class DAAL_EXPORT Result : public layers::backward::Result
95 {
96 public:
98  Result();
99  virtual ~Result() {}
100 
109  template <typename algorithmFPType>
110  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
111 
120  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
121 };
122 
123 } // namespace interface1
124 using interface1::Input;
125 using interface1::Result;
126 } // namespace backward
128 } // namespace pooling2d
129 } // namespace layers
130 } // namespace neural_networks
131 } // namespace algorithm
132 } // namespace daal
133 
134 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::pooling2d::backward::interface1::Input
Input objects for the backward 2D pooling layer
Definition: pooling2d_layer_backward_types.h:63
daal_defines.h
daal::algorithms::neural_networks::layers::pooling2d::backward::interface1::Result
Provides methods to access the result obtained with the compute() method of the backward 2D pooling l...
Definition: pooling2d_layer_backward_types.h:94

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