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

loss_layer_forward_types.h
1 /* file: loss_layer_forward_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 forward loss layer types.
21 //--
22 */
23 
24 #ifndef __LOSS_LAYER_FORWARD_TYPES_H__
25 #define __LOSS_LAYER_FORWARD_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/tensor.h"
29 #include "data_management/data/homogen_tensor.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/neural_networks/layers/layer_forward_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
37 namespace neural_networks
38 {
39 namespace layers
40 {
41 namespace loss
42 {
52 namespace forward
53 {
58 enum InputId
59 {
60  data = layers::forward::data,
61  weights = layers::forward::weights,
62  biases = layers::forward::biases, /* Biases of the neural network layer */
63  groundTruth = layers::forward::lastInputLayerDataId + 1,
64  lastInputId = groundTruth
65 };
69 namespace interface1
70 {
76 class DAAL_EXPORT Input : public layers::forward::Input
77 {
78 public:
79  typedef layers::forward::Input super;
84  DAAL_DEPRECATED Input(size_t nElements = lastInputId + 1);
85 
89  using layers::forward::Input::get;
90 
94  using layers::forward::Input::set;
95 
102  DAAL_DEPRECATED data_management::TensorPtr get(forward::InputId id) const;
103 
110  DAAL_DEPRECATED void set(InputId id, const data_management::TensorPtr &ptr);
111 
117  DAAL_DEPRECATED_VIRTUAL virtual const services::Collection<size_t> getWeightsSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
118 
124  virtual const services::Collection<size_t> getBiasesSizes(const layers::Parameter *parameter) const DAAL_C11_OVERRIDE;
125 
126  virtual ~Input() {}
127 };
128 
135 class DAAL_EXPORT Result : public layers::forward::Result
136 {
137 public:
142  DAAL_DEPRECATED Result();
143  /*
144  * \DAAL_DEPRECATED
145  */
146  virtual ~Result() {};
147 
151  using layers::forward::Result::get;
152 
156  using layers::forward::Result::set;
157 
167  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
168 
178  template <typename algorithmFPType>
179  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *parameter, const int method);
180 
186  virtual const services::Collection<size_t> getValueSize(const services::Collection<size_t> &inputSize,
187  const daal::algorithms::Parameter *par, const int method) const DAAL_C11_OVERRIDE;
188 };
189 } // namespace interface1
190 using interface1::Input;
191 using interface1::Result;
192 } // namespace forward
194 } // namespace loss
195 } // namespace layers
196 } // namespace neural_networks
197 } // namespace algorithm
198 } // namespace daal
199 #endif
daal::algorithms::neural_networks::layers::loss::forward::weights
Definition: loss_layer_forward_types.h:61
daal::algorithms::neural_networks::layers::loss::forward::interface1::Result
Provides methods to access the result obtained with the compute() method of the forward loss layer...
Definition: loss_layer_forward_types.h:135
daal::algorithms::neural_networks::layers::forward::data
Definition: layer_forward_types.h:65
daal::algorithms::neural_networks::layers::loss::forward::data
Definition: loss_layer_forward_types.h:60
daal_defines.h
daal::algorithms::neural_networks::layers::loss::forward::InputId
InputId
Definition: loss_layer_forward_types.h:58
daal::algorithms::neural_networks::layers::loss::forward::groundTruth
Definition: loss_layer_forward_types.h:63
daal::algorithms::neural_networks::layers::loss::forward::interface1::Input
Input objects for the forward loss layer
Definition: loss_layer_forward_types.h:76

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