24 #ifndef __TRUNCATED_GAUSSIAN_INITIALIZER_H__
25 #define __TRUNCATED_GAUSSIAN_INITIALIZER_H__
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/tensor.h"
29 #include "services/daal_defines.h"
30 #include "algorithms/neural_networks/initializers/initializer.h"
31 #include "algorithms/neural_networks/initializers/initializer_types.h"
32 #include "algorithms/neural_networks/initializers/truncated_gaussian/truncated_gaussian_initializer_types.h"
38 namespace neural_networks
40 namespace initializers
42 namespace truncated_gaussian
61 template<
typename algorithmFPType, Method method, CpuType cpu>
62 class BatchContainer :
public initializers::InitializerContainerIface
70 BatchContainer(daal::services::Environment::env *daalEnv);
78 services::Status compute() DAAL_C11_OVERRIDE;
95 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
96 class DAAL_EXPORT Batch :
public initializers::InitializerIface
99 typedef initializers::InitializerIface super;
101 typedef typename super::InputType InputType;
102 typedef algorithms::neural_networks::initializers::truncated_gaussian::Parameter<algorithmFPType> ParameterType;
103 typedef typename super::ResultType ResultType;
105 Parameter<algorithmFPType> parameter;
112 Batch(
double mean = 0,
double sigma = 1.00) : parameter(mean, sigma)
122 Batch(
const Batch<algorithmFPType, method> &other) : super(other), parameter(other.parameter)
131 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
137 virtual ParameterType * getParameter() DAAL_C11_OVERRIDE {
return ¶meter; }
143 ResultPtr getResult()
154 services::Status setResult(
const ResultPtr &result)
156 DAAL_CHECK(result, services::ErrorNullResult)
158 _res = _result.get();
159 return services::Status();
167 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
169 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
177 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
180 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), ¶meter, (
int) method);
181 this->_res = this->_result.get();
186 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
188 return new Batch<algorithmFPType, method>(*this);
193 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
196 _result.reset(
new ResultType());
204 using interface1::BatchContainer;
205 using interface1::Batch;
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::BatchContainer::compute
services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: truncated_gaussian_initializer.h:122
daal::batch
Definition: daal_defines.h:112
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: truncated_gaussian_initializer.h:167
daal::algorithms::covariance::mean
Definition: covariance_types.h:92
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getParameter
virtual ParameterType * getParameter() DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:137
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::Batch
Batch(double mean=0, double sigma=1.00)
Definition: truncated_gaussian_initializer.h:112
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:131
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::BatchContainer
Provides methods to run implementations of the truncated gaussian initializer. This class is associat...
Definition: truncated_gaussian_initializer.h:62
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::BatchContainer::BatchContainer
BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: truncated_gaussian_initializer.h:154
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Parameter
truncated gaussian initializer parameters
Definition: truncated_gaussian_initializer_types.h:72
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::parameter
Parameter< algorithmFPType > parameter
Definition: truncated_gaussian_initializer.h:105
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::BatchContainer::~BatchContainer
~BatchContainer()
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getResult
ResultPtr getResult()
Definition: truncated_gaussian_initializer.h:143
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:177
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:70
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch
Provides methods for truncated gaussian initializer computations in the batch processing mode...
Definition: truncated_gaussian_initializer.h:96