C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

tanh_layer_backward_types.h
1 /* file: tanh_layer_backward_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of the backward hyperbolic tangent layer.
21 //--
22 */
23 
24 #ifndef __TANH_LAYER_BACKWARD_TYPES_H__
25 #define __TANH_LAYER_BACKWARD_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/tensor.h"
29 #include "algorithms/neural_networks/layers/layer_backward_types.h"
30 #include "algorithms/neural_networks/layers/tanh/tanh_layer_types.h"
31 #include "data_management/data/homogen_tensor.h"
32 #include "services/daal_defines.h"
33 
34 
35 namespace daal
36 {
37 namespace algorithms
38 {
39 namespace neural_networks
40 {
41 namespace layers
42 {
46 namespace tanh
47 {
57 namespace backward
58 {
62 namespace interface1
63 {
69 class DAAL_EXPORT Input : public layers::backward::Input
70 {
71 public:
72  typedef layers::backward::Input super;
77  Input();
78 
83  Input(const Input& other);
84 
85  /*
86  * \DAAL_DEPRECATED
87  */
88  virtual ~Input() {}
89 
93  using layers::backward::Input::get;
97  using layers::backward::Input::set;
98 
104  data_management::TensorPtr get(LayerDataId id) const;
105 
111  void set(LayerDataId id, const data_management::TensorPtr &value);
112 
120  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
121 };
122 
128 class DAAL_EXPORT Result : public layers::backward::Result
129 {
130 public:
131  DECLARE_SERIALIZABLE_CAST(Result);
136  Result();
137 
138  /*
139  * \DAAL_DEPRECATED
140  */
141  virtual ~Result() {};
142 
146  using layers::backward::Result::get;
151  using layers::backward::Result::set;
152 
161  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
162 
171  template <typename algorithmFPType>
172  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
173 
174 protected:
176  template<typename Archive, bool onDeserialize>
177  services::Status serialImpl(Archive *arch)
178  {
179  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
180  }
181 };
182 typedef services::SharedPtr<Result> ResultPtr;
183 
184 } // namespace interface1
185 using interface1::Input;
186 using interface1::Result;
187 using interface1::ResultPtr;
188 } // namespace backward
190 } // namespace tanh
191 } // namespace layers
192 } // namespace neural_networks
193 } // namespace algorithm
194 } // namespace daal
195 #endif
daal::algorithms::neural_networks::layers::tanh::backward::interface1::Input
Input objects for the backward hyperbolic tangent layer
Definition: tanh_layer_backward_types.h:69
daal_defines.h
daal::algorithms::neural_networks::layers::tanh::backward::interface1::Result
Provides methods to access the result obtained with the compute() method of the backward hyperbolic t...
Definition: tanh_layer_backward_types.h:128
daal::algorithms::neural_networks::layers::tanh::LayerDataId
LayerDataId
Identifiers of input objects for the backward hyperbolic tangent layer and results for the forward hy...
Definition: tanh_layer_types.h:66
daal::algorithms::math::abs::value
Definition: abs_types.h:88

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