25 #ifndef __NEURAL_NETWORKS_PREDICTION_H__
26 #define __NEURAL_NETWORKS_PREDICTION_H__
28 #include "algorithms/algorithm.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/neural_networks/neural_networks_types.h"
32 #include "algorithms/neural_networks/neural_networks_prediction_types.h"
33 #include "algorithms/neural_networks/neural_networks_prediction_model.h"
34 #include "algorithms/neural_networks/layers/layer.h"
43 namespace neural_networks
59 template<
typename algorithmFPType, Method method, CpuType cpu>
60 class BatchContainer :
public PredictionContainerIface
69 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
74 DAAL_DEPRECATED ~BatchContainer();
79 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
83 DAAL_DEPRECATED services::Status setupCompute() DAAL_C11_OVERRIDE;
87 DAAL_DEPRECATED services::Status resetCompute() DAAL_C11_OVERRIDE;
107 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
108 class Batch :
public daal::algorithms::Prediction
111 typedef algorithms::neural_networks::prediction::Input InputType;
112 typedef algorithms::neural_networks::prediction::Parameter ParameterType;
113 typedef algorithms::neural_networks::prediction::Result ResultType;
119 DAAL_DEPRECATED Batch()
130 Batch(
const Batch<algorithmFPType, method> &other) : parameter(other.parameter), input(other.input)
145 DAAL_DEPRECATED ResultPtr getResult()
157 DAAL_DEPRECATED services::Status setResult(
const ResultPtr& res)
159 DAAL_CHECK(res, services::ErrorNullResult)
161 _res = _result.get();
162 return services::Status();
171 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
173 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
181 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
184 ParameterType parameter;
192 Prediction::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
195 _result.reset(
new ResultType());
201 DAAL_DEPRECATED_VIRTUAL
virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
203 return new Batch<algorithmFPType, method>(*this);
209 DAAL_DEPRECATED_VIRTUAL
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
211 services::Status s = _result->allocate<algorithmFPType>(&input, ¶meter, (int) method);
212 _res = _result.get();
222 using interface1::Batch;
223 using interface1::BatchContainer;
daal::algorithms::neural_networks::prediction::interface1::Batch::input
InputType input
Definition: neural_networks_prediction.h:183
daal::batch
Definition: daal_defines.h:112
daal::algorithms::neural_networks::prediction::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: neural_networks_prediction.h:130
daal::algorithms::neural_networks::prediction::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::neural_networks::prediction::interface1::Batch::getResult
DAAL_DEPRECATED ResultPtr getResult()
Definition: neural_networks_prediction.h:145
daal::algorithms::neural_networks::prediction::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::neural_networks::prediction::interface1::BatchContainer::setupCompute
DAAL_DEPRECATED services::Status setupCompute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::prediction::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: neural_networks_prediction.h:181
daal::algorithms::neural_networks::prediction::interface1::Batch
Provides methods for neural network model-based prediction in the batch processing mode...
Definition: neural_networks_prediction.h:108
daal::algorithms::neural_networks::prediction::interface1::Batch::setResult
DAAL_DEPRECATED services::Status setResult(const ResultPtr &res)
Definition: neural_networks_prediction.h:157
daal::algorithms::PredictionContainerIface
Abstract interface class that provides virtual methods to access and run implementations of the algor...
Definition: prediction.h:42
daal::algorithms::neural_networks::prediction::interface1::BatchContainer
Class containing methods to train neural network model using algorithmFPType precision arithmetic...
Definition: neural_networks_prediction.h:60
daal::algorithms::neural_networks::prediction::interface1::Batch::parameter
ParameterType parameter
Definition: neural_networks_prediction.h:184
daal::algorithms::neural_networks::prediction::interface1::BatchContainer::resetCompute
DAAL_DEPRECATED services::Status resetCompute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::prediction::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: neural_networks_prediction.h:171
daal::algorithms::Prediction
Provides prediction methods depending on the model such as linear_regression::Model. The methods of the class support different computation modes: batch, distributed, and online(see ComputeMode). Classes that implement specific algorithms of the model based data prediction are derived classes of the Prediction class. The class additionally provides virtual methods for validation of input and output parameters of the algorithms.
Definition: prediction.h:52