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

locallyconnected2d_layer_forward_types.h
1 /* file: locallyconnected2d_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 forward two-dimensional (2D) locally connected layer.
19 //--
20 */
21 
22 #ifndef __LOCALLYCONNECTED2D_LAYER_FORWARD_TYPES_H__
23 #define __LOCALLYCONNECTED2D_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/locallyconnected2d/locallyconnected2d_layer_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace neural_networks
37 {
38 namespace layers
39 {
40 namespace locallyconnected2d
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 
93  template <typename algorithmFPType>
94  DAAL_EXPORT services::Status allocate(const daal::algorithms::Parameter *parameter, const int method);
95 
100  virtual const services::Collection<size_t> getWeightsSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
101 
106  virtual const services::Collection<size_t> getBiasesSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
107 
115  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
116 };
117 
123 class DAAL_EXPORT Result : public layers::forward::Result
124 {
125 public:
126  DECLARE_SERIALIZABLE_CAST(Result);
130  Result();
131 
132  virtual ~Result() {}
133 
137  using layers::forward::Result::get;
138 
142  using layers::forward::Result::set;
143 
148  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
149  const daal::algorithms::Parameter *parameter, const int method) const DAAL_C11_OVERRIDE;
150 
159  template <typename algorithmFPType>
160  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
161 
168  virtual services::Status setResultForBackward(const daal::algorithms::Input *input) DAAL_C11_OVERRIDE;
169 
175  data_management::TensorPtr get(LayerDataId id) const;
176 
182  void set(LayerDataId id, const data_management::TensorPtr &value);
183 
192  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
193 
194 protected:
196  template<typename Archive, bool onDeserialize>
197  services::Status serialImpl(Archive *arch)
198  {
199  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
200  }
201 };
202 typedef services::SharedPtr<Result> ResultPtr;
203 
204 } // namespace interface1
205 using interface1::Input;
206 using interface1::Result;
207 using interface1::ResultPtr;
208 
209 } // namespace forward
211 } // namespace locallyconnected2d
212 } // namespace layers
213 } // namespace neural_networks
214 } // namespace algorithms
215 } // namespace daal
216 
217 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::locallyconnected2d::forward::interface1::Result
Results obtained with the compute() method of the forward 2D locally connected layer in the batch pro...
Definition: locallyconnected2d_layer_forward_types.h:123
daal_defines.h
daal::algorithms::neural_networks::layers::locallyconnected2d::forward::interface1::Input
Input objects for the forward 2D locally connected layer
Definition: locallyconnected2d_layer_forward_types.h:63
daal::algorithms::neural_networks::layers::locallyconnected2d::LayerDataId
LayerDataId
Definition: locallyconnected2d_layer_types.h:60
daal::algorithms::math::abs::value
Definition: abs_types.h:86

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