22 #ifndef __INITIALIZERS__TYPES__H__
23 #define __INITIALIZERS__TYPES__H__
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/tensor.h"
27 #include "services/daal_defines.h"
28 #include "services/collection.h"
29 #include "data_management/data/data_collection.h"
30 #include "algorithms/neural_networks/initializers/initializer_types_defs.h"
31 #include "algorithms/engines/engine.h"
32 #include "algorithms/engines/mt19937/mt19937.h"
38 namespace neural_networks
49 namespace initializers
81 class Parameter:
public daal::algorithms::Parameter
84 Parameter(layers::forward::LayerIfacePtr layerForParameter = layers::forward::LayerIfacePtr()): layer(layerForParameter) {}
85 virtual ~Parameter() {}
87 layers::forward::LayerIfacePtr layer;
88 engines::EnginePtr engine;
95 class DAAL_EXPORT Input :
public daal::algorithms::Input
101 Input() : daal::algorithms::Input(1) {}
103 Input(
const Input& other) : daal::algorithms::Input(other){}
112 data_management::TensorPtr
get(InputId id)
const
114 return data_management::Tensor::cast(Argument::get(
id));
122 void set(InputId
id,
const data_management::TensorPtr &ptr)
124 Argument::set(
id, ptr);
134 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
141 class DAAL_EXPORT Result :
public daal::algorithms::Result
145 Result() : daal::algorithms::Result(1) {}
157 template <
typename algorithmFPType>
158 services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
const int method)
160 const Input *algInput =
static_cast<const Input *
>(input);
162 set(value, algInput->get(data));
163 return services::Status();
171 data_management::TensorPtr
get(ResultId id)
const
173 return data_management::Tensor::cast(Argument::get(
id));
181 void set(ResultId
id,
const data_management::TensorPtr &ptr)
183 Argument::set(
id, ptr);
194 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
195 int method)
const DAAL_C11_OVERRIDE;
199 template<
typename Archive,
bool onDeserialize>
200 services::Status serialImpl(Archive *arch)
202 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
205 typedef services::SharedPtr<Result> ResultPtr;
207 using interface1::Input;
208 using interface1::Result;
209 using interface1::ResultPtr;
210 using interface1::Parameter;
daal::algorithms::neural_networks::initializers::interface1::Parameter::layer
layers::forward::LayerIfacePtr layer
Definition: initializer_types.h:87
daal
Definition: algorithm_base_common.h:31
daal::algorithms::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:307
daal::algorithms::neural_networks::initializers::value
Definition: initializer_types.h:67
daal::algorithms::neural_networks::initializers::interface1::Result::Result
Result()
Constructor.
Definition: initializer_types.h:145
daal::algorithms::neural_networks::initializers::ResultId
ResultId
Definition: initializer_types.h:65
daal::algorithms::neural_networks::initializers::interface1::Parameter::engine
engines::EnginePtr engine
Definition: initializer_types.h:88
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:60
daal::algorithms::neural_networks::initializers::interface1::Result
Provides methods to access the result obtained with the compute() method of the neural network weight...
Definition: initializer_types.h:141
daal::algorithms::neural_networks::initializers::interface1::Result::allocate
services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method)
Definition: initializer_types.h:158
daal::algorithms::neural_networks::initializers::InputId
InputId
Definition: initializer_types.h:55
daal::algorithms::neural_networks::initializers::data
Definition: initializer_types.h:57
daal::algorithms::neural_networks::initializers::interface1::Result::set
void set(ResultId id, const data_management::TensorPtr &ptr)
Definition: initializer_types.h:181
daal::algorithms::neural_networks::initializers::interface1::Parameter
Definition: initializer_types.h:81