22 #ifndef __ELTWISE_SUM_LAYER_FORWARD_TYPES_H__
23 #define __ELTWISE_SUM_LAYER_FORWARD_TYPES_H__
25 #include "algorithms/algorithm.h"
26 #include "services/daal_defines.h"
28 #include "data_management/data/tensor.h"
30 #include "algorithms/neural_networks/layers/layer_forward_types.h"
31 #include "algorithms/neural_networks/layers/eltwise_sum/eltwise_sum_layer_types.h"
37 namespace neural_networks
61 coefficients = layers::forward::lastInputLayerDataId + 1,
62 lastInputId = coefficients
75 class DAAL_EXPORT Input :
public layers::forward::Input
78 typedef layers::forward::Input super;
85 Input(
const Input& other);
92 using layers::forward::Input::set;
96 using layers::forward::Input::get;
103 data_management::TensorPtr
get(InputId id)
const;
110 void set(InputId
id,
const data_management::TensorPtr &value);
118 data_management::TensorPtr
get(layers::forward::InputLayerDataId id,
size_t index)
const;
126 void set(layers::forward::InputLayerDataId
id,
const data_management::TensorPtr &value,
size_t index);
135 virtual services::Status addData(
const data_management::TensorPtr &dataTensor,
size_t index) DAAL_C11_OVERRIDE;
142 virtual services::Status eraseInputData() DAAL_C11_OVERRIDE;
151 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
156 services::Status checkInputTensors(
const LayerData &layerData)
const;
157 services::Status checkCoefficients(
const LayerData &layerData)
const;
159 LayerDataPtr getInputLayerDataAllocateIfEmpty();
167 class DAAL_EXPORT Result :
public layers::forward::Result
170 DECLARE_SERIALIZABLE_CAST(Result);
182 using layers::forward::Result::get;
187 using layers::forward::Result::set;
197 template <
typename algorithmFPType>
198 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
199 const daal::algorithms::Parameter *parameter,
const int method);
205 virtual const services::Collection<size_t> getValueSize(
const services::Collection<size_t> &inputSize,
206 const daal::algorithms::Parameter *par,
const int method)
const DAAL_C11_OVERRIDE;
215 virtual services::Collection<size_t> getValueSize(
const services::Collection< services::Collection<size_t> > &inputSize,
216 const daal::algorithms::Parameter *parameter,
const int method) DAAL_C11_OVERRIDE;
223 data_management::TensorPtr
get(LayerDataId id)
const;
230 data_management::NumericTablePtr
get(LayerDataNumericTableId id)
const;
237 void set(LayerDataId
id,
const data_management::TensorPtr &value);
244 void set(LayerDataNumericTableId
id,
const data_management::NumericTablePtr &value);
252 virtual services::Status setResultForBackward(
const daal::algorithms::Input *input) DAAL_C11_OVERRIDE;
262 virtual services::Status check(
const daal::algorithms::Input *input,
263 const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
267 template<
typename Archive,
bool onDeserialize>
268 services::Status serialImpl(Archive *arch)
270 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
276 services::Status checkValue(
const Input *input)
const;
277 services::Status checkAuxCoefficients(
const Input *input)
const;
278 services::Status checkAuxNumberOfCoefficients(
const Input *input)
const;
280 LayerDataPtr getResultLayerDataAllocateIfEmpty();
282 template<
typename algorithmFPType>
283 services::Status allocateValueTensor(
const Input *eltwiseInput);
286 typedef services::SharedPtr<Result> ResultPtr;
289 using interface1::Input;
290 using interface1::Result;
291 using interface1::ResultPtr;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::eltwise_sum::forward::interface1::Result
Results obtained with the compute() method of the forward element-wise sum layer in the batch process...
Definition: eltwise_sum_layer_forward_types.h:167
daal::algorithms::neural_networks::layers::eltwise_sum::forward::coefficients
Definition: eltwise_sum_layer_forward_types.h:61
daal::algorithms::neural_networks::layers::eltwise_sum::LayerDataNumericTableId
LayerDataNumericTableId
Available identifiers of input numeric tables for the backward element-wise sum layer and identifiers...
Definition: eltwise_sum_layer_types.h:72
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::neural_networks::layers::eltwise_sum::LayerDataId
LayerDataId
Available identifiers of input tensors for the backward element-wise sum layer and identifiers of res...
Definition: eltwise_sum_layer_types.h:61
daal::algorithms::neural_networks::layers::eltwise_sum::forward::InputId
InputId
Definition: eltwise_sum_layer_forward_types.h:59
daal::algorithms::neural_networks::layers::forward::InputLayerDataId
InputLayerDataId
Definition: layer_forward_types.h:73