22 #ifndef __NEURAL_NETWORKS_TRAINING_INPUT_H__
23 #define __NEURAL_NETWORKS_TRAINING_INPUT_H__
25 #include "algorithms/algorithm.h"
27 #include "data_management/data/tensor.h"
28 #include "data_management/data/data_serialize.h"
29 #include "data_management/data/data_collection.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/neural_networks/neural_networks_training_model.h"
32 #include "algorithms/neural_networks/neural_networks_training_partial_result.h"
41 namespace neural_networks
57 lastInputId = groundTruth
64 enum InputCollectionId
66 groundTruthCollection = lastInputId + 1,
67 lastInputCollectionId = groundTruthCollection
74 enum Step1LocalInputId
76 inputModel = lastInputCollectionId + 1,
77 lastStep1LocalInputId = inputModel
84 enum Step2MasterInputId
88 lastStep2MasterInputId = partialResults
100 class DAAL_EXPORT Input :
public daal::algorithms::Input
103 Input(
size_t nElements = lastInputCollectionId + 1);
104 Input(
const Input& other);
113 data_management::TensorPtr
get(InputId id)
const;
120 data_management::KeyValueDataCollectionPtr
get(InputCollectionId id)
const;
128 data_management::TensorPtr
get(InputCollectionId id,
size_t key)
const;
135 void set(InputId
id,
const data_management::TensorPtr &value);
142 void set(InputCollectionId
id,
const data_management::KeyValueDataCollectionPtr &value);
150 void add(InputCollectionId
id,
size_t key,
const data_management::TensorPtr &value);
159 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
162 services::Status checkImpl(
const daal::algorithms::Parameter *par,
int method)
const;
169 template<ComputeStep step>
170 class DAAL_EXPORT DistributedInput
178 class DAAL_EXPORT DistributedInput<step1Local> :
public Input
181 DistributedInput(
size_t nElements = lastStep1LocalInputId + 1);
182 DistributedInput(
const DistributedInput& other);
184 virtual ~DistributedInput() {};
194 ModelPtr
get(Step1LocalInputId id)
const;
201 void set(Step1LocalInputId
id,
const ModelPtr &value);
210 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
218 class DAAL_EXPORT DistributedInput<step2Master> :
public daal::algorithms::Input
222 DistributedInput(
const DistributedInput& other);
224 virtual ~DistributedInput() {};
231 data_management::KeyValueDataCollectionPtr
get(Step2MasterInputId id)
const;
238 void set(Step2MasterInputId
id,
const data_management::KeyValueDataCollectionPtr &value);
246 void add(Step2MasterInputId
id,
size_t key,
const PartialResultPtr &value);
255 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
259 using interface1::Input;
260 using interface1::DistributedInput;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::training::InputCollectionId
InputCollectionId
Available identifiers of input collection objects for the neural network model based training...
Definition: neural_networks_training_input.h:64
daal::algorithms::neural_networks::training::inputModel
Definition: neural_networks_training_input.h:76
daal::algorithms::neural_networks::training::data
Definition: neural_networks_training_input.h:55
daal::algorithms::neural_networks::training::InputId
InputId
Available identifiers of input objects for the neural network model based training.
Definition: neural_networks_training_input.h:53
daal::algorithms::neural_networks::training::groundTruthCollection
Definition: neural_networks_training_input.h:66
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::step1Local
Definition: daal_defines.h:117
daal::step2Master
Definition: daal_defines.h:118
daal::algorithms::neural_networks::training::Step1LocalInputId
Step1LocalInputId
Available identifiers of input objects for the neural network model based training.
Definition: neural_networks_training_input.h:74
daal::algorithms::neural_networks::training::Step2MasterInputId
Step2MasterInputId
Partial results from the previous steps in the distributed processing mode required by the second dis...
Definition: neural_networks_training_input.h:84
daal::algorithms::neural_networks::training::partialResults
Definition: neural_networks_training_input.h:86
daal::algorithms::neural_networks::training::groundTruth
Definition: neural_networks_training_input.h:56