48 #ifndef __INITIALIZERS__TYPES__H__ 49 #define __INITIALIZERS__TYPES__H__ 51 #include "algorithms/algorithm.h" 52 #include "data_management/data/tensor.h" 53 #include "services/daal_defines.h" 54 #include "services/collection.h" 55 #include "data_management/data/data_collection.h" 56 #include "algorithms/neural_networks/initializers/initializer_types_defs.h" 57 #include "algorithms/engines/engine.h" 58 #include "algorithms/engines/mt19937/mt19937.h" 64 namespace neural_networks
75 namespace initializers
107 class Parameter:
public daal::algorithms::Parameter
110 Parameter(layers::forward::LayerIfacePtr layerForParameter = layers::forward::LayerIfacePtr()): layer(layerForParameter) {}
111 virtual ~Parameter() {}
113 layers::forward::LayerIfacePtr layer;
114 engines::EnginePtr engine;
121 class DAAL_EXPORT Input :
public daal::algorithms::Input
127 Input() : daal::algorithms::Input(1) {}
129 Input(
const Input& other) : daal::algorithms::Input(other){}
138 data_management::TensorPtr
get(InputId id)
const 140 return data_management::Tensor::cast(Argument::get(
id));
148 void set(InputId id,
const data_management::TensorPtr &ptr)
150 Argument::set(
id, ptr);
160 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
167 class DAAL_EXPORT Result :
public daal::algorithms::Result
171 Result() : daal::algorithms::Result(1) {}
183 template <
typename algorithmFPType>
184 services::Status allocate(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *par,
const int method)
186 const Input *algInput =
static_cast<const Input *
>(input);
188 set(value, algInput->get(data));
189 return services::Status();
197 data_management::TensorPtr
get(ResultId id)
const 199 return data_management::Tensor::cast(Argument::get(
id));
207 void set(ResultId id,
const data_management::TensorPtr &ptr)
209 Argument::set(
id, ptr);
220 virtual services::Status check(
const daal::algorithms::Input *input,
const daal::algorithms::Parameter *parameter,
221 int method)
const DAAL_C11_OVERRIDE;
225 template<
typename Archive,
bool onDeserialize>
226 services::Status serialImpl(Archive *arch)
228 return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
231 typedef services::SharedPtr<Result> ResultPtr;
233 using interface1::Input;
234 using interface1::Result;
235 using interface1::ResultPtr;
236 using interface1::Parameter;
daal::algorithms::neural_networks::initializers::value
Definition: initializer_types.h:93
daal::algorithms::neural_networks::initializers::interface1::Parameter::layer
layers::forward::LayerIfacePtr layer
Definition: initializer_types.h:113
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::interface1::Result
Base class to represent final results of the computation. Algorithm-specific final results are repres...
Definition: algorithm_types.h:331
daal::algorithms::neural_networks::initializers::interface1::Result::Result
Result()
Constructor.
Definition: initializer_types.h:171
daal::algorithms::neural_networks::initializers::interface1::Parameter::engine
engines::EnginePtr engine
Definition: initializer_types.h:114
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::initializers::data
Definition: initializer_types.h:83
daal::algorithms::neural_networks::initializers::ResultId
ResultId
Definition: initializer_types.h:91
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:167
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:184
daal::algorithms::neural_networks::initializers::InputId
InputId
Definition: initializer_types.h:81
daal::algorithms::interface1::Argument::get
const data_management::SerializationIfacePtr & get(size_t index) const
daal::algorithms::interface1::Argument::set
void set(size_t index, const data_management::SerializationIfacePtr &value)
daal::algorithms::neural_networks::initializers::interface1::Parameter
Definition: initializer_types.h:107