48 #ifndef __NEURAL_NETWORKS_TRAINING_INPUT_H__ 49 #define __NEURAL_NETWORKS_TRAINING_INPUT_H__ 51 #include "algorithms/algorithm.h" 53 #include "data_management/data/tensor.h" 54 #include "data_management/data/data_serialize.h" 55 #include "data_management/data/data_collection.h" 56 #include "services/daal_defines.h" 57 #include "algorithms/neural_networks/neural_networks_training_model.h" 58 #include "algorithms/neural_networks/neural_networks_training_partial_result.h" 67 namespace neural_networks
83 lastInputId = groundTruth
90 enum InputCollectionId
92 groundTruthCollection = lastInputId + 1,
93 lastInputCollectionId = groundTruthCollection
100 enum Step1LocalInputId
102 inputModel = lastInputCollectionId + 1,
103 lastStep1LocalInputId = inputModel
110 enum Step2MasterInputId
114 lastStep2MasterInputId = partialResults
126 class DAAL_EXPORT Input :
public daal::algorithms::Input
129 Input(
size_t nElements = lastInputCollectionId + 1);
130 Input(
const Input& other);
139 data_management::TensorPtr
get(InputId id)
const;
146 data_management::KeyValueDataCollectionPtr
get(InputCollectionId id)
const;
154 data_management::TensorPtr
get(InputCollectionId id,
size_t key)
const;
161 void set(InputId id,
const data_management::TensorPtr &value);
168 void set(InputCollectionId id,
const data_management::KeyValueDataCollectionPtr &value);
176 void add(InputCollectionId
id,
size_t key,
const data_management::TensorPtr &value);
185 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
188 services::Status checkImpl(
const daal::algorithms::Parameter *par,
int method)
const;
195 template<ComputeStep step>
196 class DAAL_EXPORT DistributedInput
204 class DAAL_EXPORT DistributedInput<step1Local> :
public Input
207 DistributedInput(
size_t nElements = lastStep1LocalInputId + 1);
208 DistributedInput(
const DistributedInput& other);
210 virtual ~DistributedInput() {};
220 ModelPtr
get(Step1LocalInputId id)
const;
227 void set(Step1LocalInputId id,
const ModelPtr &value);
236 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
244 class DAAL_EXPORT DistributedInput<step2Master> :
public daal::algorithms::Input
248 DistributedInput(
const DistributedInput& other);
250 virtual ~DistributedInput() {};
257 data_management::KeyValueDataCollectionPtr
get(Step2MasterInputId id)
const;
264 void set(Step2MasterInputId id,
const data_management::KeyValueDataCollectionPtr &value);
272 void add(Step2MasterInputId
id,
size_t key,
const PartialResultPtr &value);
281 services::Status check(
const daal::algorithms::Parameter *par,
int method)
const DAAL_C11_OVERRIDE;
285 using interface1::Input;
286 using interface1::DistributedInput;
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::training::InputCollectionId
InputCollectionId
Available identifiers of input collection objects for the neural network model based training...
Definition: neural_networks_training_input.h:90
daal::algorithms::neural_networks::training::inputModel
Definition: neural_networks_training_input.h:102
daal::algorithms::neural_networks::training::data
Definition: neural_networks_training_input.h:81
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:79
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
daal::algorithms::neural_networks::training::groundTruthCollection
Definition: neural_networks_training_input.h:92
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::math::abs::value
Definition: abs_types.h:112
daal::step1Local
Definition: daal_defines.h:143
daal::step2Master
Definition: daal_defines.h:144
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:100
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:110
daal::algorithms::neural_networks::training::partialResults
Definition: neural_networks_training_input.h:112
daal::algorithms::neural_networks::training::groundTruth
Definition: neural_networks_training_input.h:82