48 #ifndef __ELTWISE_SUM_LAYER_FORWARD_TYPES_H__ 49 #define __ELTWISE_SUM_LAYER_FORWARD_TYPES_H__ 51 #include "algorithms/algorithm.h" 52 #include "services/daal_defines.h" 54 #include "data_management/data/tensor.h" 56 #include "algorithms/neural_networks/layers/layer_forward_types.h" 57 #include "algorithms/neural_networks/layers/eltwise_sum/eltwise_sum_layer_types.h" 63 namespace neural_networks
87 coefficients = layers::forward::lastInputLayerDataId + 1,
88 lastInputId = coefficients
101 class DAAL_EXPORT Input :
public layers::forward::Input
104 typedef layers::forward::Input super;
111 Input(
const Input& other);
118 using layers::forward::Input::set;
122 using layers::forward::Input::get;
129 data_management::TensorPtr
get(InputId id)
const;
136 void set(InputId id,
const data_management::TensorPtr &value);
144 data_management::TensorPtr
get(layers::forward::InputLayerDataId id,
size_t index)
const;
152 void set(layers::forward::InputLayerDataId id,
const data_management::TensorPtr &value,
size_t index);
161 virtual services::Status addData(
const data_management::TensorPtr &dataTensor,
size_t index) DAAL_C11_OVERRIDE;
168 virtual services::Status eraseInputData() DAAL_C11_OVERRIDE;
177 services::Status check(
const daal::algorithms::Parameter *parameter,
int method)
const DAAL_C11_OVERRIDE;
182 services::Status checkInputTensors(
const LayerData &layerData)
const;
183 services::Status checkCoefficients(
const LayerData &layerData)
const;
185 LayerDataPtr getInputLayerDataAllocateIfEmpty();
193 class DAAL_EXPORT Result :
public layers::forward::Result
196 DECLARE_SERIALIZABLE_CAST(Result);
208 using layers::forward::Result::get;
213 using layers::forward::Result::set;
223 template <
typename algorithmFPType>
224 DAAL_EXPORT services::Status allocate(
const daal::algorithms::Input *input,
225 const daal::algorithms::Parameter *parameter,
const int method);
231 virtual const services::Collection<size_t> getValueSize(
const services::Collection<size_t> &inputSize,
232 const daal::algorithms::Parameter *par,
const int method)
const DAAL_C11_OVERRIDE;
241 virtual services::Collection<size_t> getValueSize(
const services::Collection< services::Collection<size_t> > &inputSize,
242 const daal::algorithms::Parameter *parameter,
const int method) DAAL_C11_OVERRIDE;
249 data_management::TensorPtr
get(LayerDataId id)
const;
256 data_management::NumericTablePtr
get(LayerDataNumericTableId id)
const;
263 void set(LayerDataId id,
const data_management::TensorPtr &value);
270 void set(LayerDataNumericTableId id,
const data_management::NumericTablePtr &value);
278 virtual services::Status setResultForBackward(
const daal::algorithms::Input *input) DAAL_C11_OVERRIDE;
288 virtual services::Status check(
const daal::algorithms::Input *input,
289 const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
293 template<
typename Archive,
bool onDeserialize>
294 services::Status serialImpl(Archive *arch)
296 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
302 services::Status checkValue(
const Input *input)
const;
303 services::Status checkAuxCoefficients(
const Input *input)
const;
304 services::Status checkAuxNumberOfCoefficients(
const Input *input)
const;
306 LayerDataPtr getResultLayerDataAllocateIfEmpty();
308 template<
typename algorithmFPType>
309 services::Status allocateValueTensor(
const Input *eltwiseInput);
312 typedef services::SharedPtr<Result> ResultPtr;
315 using interface1::Input;
316 using interface1::Result;
317 using interface1::ResultPtr;
daal::algorithms::neural_networks::layers::eltwise_sum::forward::coefficients
Definition: eltwise_sum_layer_forward_types.h:87
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::layers::forward::InputLayerDataId
InputLayerDataId
Definition: layer_forward_types.h:99
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:193
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:98
daal::algorithms::neural_networks::layers::forward::interface1::Result::get
data_management::TensorPtr get(ResultId id) const
daal::algorithms::neural_networks::layers::eltwise_sum::forward::InputId
InputId
Definition: eltwise_sum_layer_forward_types.h:85
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:87
daal::algorithms::neural_networks::layers::forward::interface1::Result::set
void set(ResultId id, const data_management::TensorPtr &ptr)
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::neural_networks::layers::forward::interface1::Result
Provides methods to access the result obtained with the compute() method of the layer algorithm...
Definition: layer_forward_types.h:241
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::services::interface1::Collection
Class that implements functionality of the Collection container.
Definition: collection.h:69