48 #ifndef __TRUNCATED_GAUSSIAN_INITIALIZER_H__
49 #define __TRUNCATED_GAUSSIAN_INITIALIZER_H__
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/tensor.h"
53 #include "services/daal_defines.h"
54 #include "algorithms/neural_networks/initializers/initializer.h"
55 #include "algorithms/neural_networks/initializers/initializer_types.h"
56 #include "algorithms/neural_networks/initializers/truncated_gaussian/truncated_gaussian_initializer_types.h"
62 namespace neural_networks
64 namespace initializers
66 namespace truncated_gaussian
85 template<
typename algorithmFPType, Method method, CpuType cpu>
86 class DAAL_EXPORT BatchContainer :
public initializers::InitializerContainerIface
94 BatchContainer(daal::services::Environment::env *daalEnv);
102 services::Status compute() DAAL_C11_OVERRIDE;
119 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
120 class DAAL_EXPORT Batch :
public initializers::InitializerIface
123 typedef initializers::InitializerIface super;
124 Parameter<algorithmFPType> parameter;
131 Batch(
double mean = 0,
double sigma = 1.00) : parameter(mean, sigma)
141 Batch(
const Batch<algorithmFPType, method> &other) : super(other), parameter(other.parameter)
150 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
156 virtual Parameter<algorithmFPType> * getParameter() DAAL_C11_OVERRIDE {
return ¶meter; }
162 ResultPtr getResult()
173 services::Status setResult(
const ResultPtr &result)
175 DAAL_CHECK(result, services::ErrorNullResult)
177 _res = _result.get();
178 return services::Status();
186 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
188 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
196 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
199 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), ¶meter, (
int) method);
200 this->_res = this->_result.get();
205 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
207 return new Batch<algorithmFPType, method>(*this);
212 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env);
215 _result.reset(
new Result());
223 using interface1::BatchContainer;
224 using interface1::Batch;
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:86
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: truncated_gaussian_initializer.h:173
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::parameter
Parameter< algorithmFPType > parameter
Definition: truncated_gaussian_initializer.h:124
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getResult
ResultPtr getResult()
Definition: truncated_gaussian_initializer.h:162
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::Batch
Batch(double mean=0, double sigma=1.00)
Definition: truncated_gaussian_initializer.h:131
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: truncated_gaussian_initializer.h:141
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:150
daal::batch
Definition: daal_defines.h:131
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:120
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Parameter
truncated gaussian initializer parameters
Definition: truncated_gaussian_initializer_types.h:98
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:196
daal::algorithms::covariance::mean
Definition: covariance_types.h:116
daal::algorithms::Analysis
Provides methods for execution of operations over data, such as computation of Summary Statistics est...
Definition: analysis.h:94
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::getParameter
virtual Parameter< algorithmFPType > * getParameter() DAAL_C11_OVERRIDE
Definition: truncated_gaussian_initializer.h:156
daal::services::ErrorNullResult
Definition: error_indexes.h:122
daal::algorithms::neural_networks::initializers::truncated_gaussian::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: truncated_gaussian_initializer.h:186