24 #ifndef __CONCAT_LAYER_FORWARD_H__
25 #define __CONCAT_LAYER_FORWARD_H__
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/tensor.h"
29 #include "services/daal_defines.h"
30 #include "algorithms/neural_networks/layers/layer.h"
31 #include "algorithms/neural_networks/layers/concat/concat_layer_types.h"
32 #include "algorithms/neural_networks/layers/concat/concat_layer_forward_types.h"
38 namespace neural_networks
71 template<
typename algorithmFPType, Method method, CpuType cpu>
72 class BatchContainer :
public layers::forward::LayerContainerIfaceImpl
81 DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv);
86 DAAL_DEPRECATED ~BatchContainer();
93 DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE;
116 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
117 class Batch :
public layers::forward::LayerIfaceImpl
120 typedef layers::forward::LayerIfaceImpl super;
122 typedef algorithms::neural_networks::layers::concat::forward::Input InputType;
123 typedef algorithms::neural_networks::layers::concat::Parameter ParameterType;
124 typedef algorithms::neural_networks::layers::concat::forward::Result ResultType;
126 ParameterType ¶meter;
134 DAAL_DEPRECATED Batch(
size_t concatDimension = 0) : _defaultParameter(concatDimension), parameter(_defaultParameter)
145 DAAL_DEPRECATED Batch(ParameterType& parameter) : parameter(parameter), _defaultParameter(parameter)
156 Batch(
const Batch<algorithmFPType, method> &other) : super(other),
157 _defaultParameter(other.parameter), parameter(_defaultParameter), input(other.input)
167 DAAL_DEPRECATED_VIRTUAL
virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
174 DAAL_DEPRECATED_VIRTUAL
virtual InputType *getLayerInput() DAAL_C11_OVERRIDE {
return &input; }
181 DAAL_DEPRECATED_VIRTUAL
virtual ParameterType *getLayerParameter() DAAL_C11_OVERRIDE {
return ¶meter; };
188 DAAL_DEPRECATED layers::forward::ResultPtr getLayerResult() DAAL_C11_OVERRIDE
198 ResultPtr getResult()
210 DAAL_DEPRECATED services::Status setResult(
const ResultPtr& result)
212 DAAL_CHECK(result, services::ErrorNullResult)
214 _res = _result.get();
215 return services::Status();
224 DAAL_DEPRECATED services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
226 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
235 DAAL_DEPRECATED_VIRTUAL
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
237 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), ¶meter, (
int) method);
238 this->_res = this->_result.get();
246 DAAL_DEPRECATED_VIRTUAL
virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
248 return new Batch<algorithmFPType, method>(*this);
256 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_LAYER_CONTAINER(BatchContainer, algorithmFPType, method)(&_env);
259 _result.reset(
new ResultType());
264 ParameterType _defaultParameter;
268 using interface1::BatchContainer;
269 using interface1::Batch;
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getMethod
virtual DAAL_DEPRECATED_VIRTUAL int getMethod() const DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:167
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::parameter
ParameterType & parameter
Definition: concat_layer_forward.h:126
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::setResult
DAAL_DEPRECATED services::Status setResult(const ResultPtr &result)
Definition: concat_layer_forward.h:210
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getLayerInput
virtual DAAL_DEPRECATED_VIRTUAL InputType * getLayerInput() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:174
daal::algorithms::neural_networks::layers::concat::forward::interface1::BatchContainer::~BatchContainer
DAAL_DEPRECATED ~BatchContainer()
daal::algorithms::neural_networks::layers::concat::forward::interface1::BatchContainer::compute
DAAL_DEPRECATED services::Status compute() DAAL_C11_OVERRIDE
daal::algorithms::neural_networks::layers::concat::forward::interface1::BatchContainer::BatchContainer
DAAL_DEPRECATED BatchContainer(daal::services::Environment::env *daalEnv)
daal::algorithms::neural_networks::layers::concat::forward::interface1::BatchContainer
Provides methods to run implementations of the of the forward concat layer This class is associated w...
Definition: concat_layer_forward.h:72
daal::services::ErrorNullResult
Definition: error_indexes.h:98
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
DAAL_DEPRECATED Batch(ParameterType ¶meter)
Definition: concat_layer_forward.h:145
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
DAAL_DEPRECATED Batch(size_t concatDimension=0)
Definition: concat_layer_forward.h:134
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch
Computes the results of the forward concat layer in the batch processing mode.
Definition: concat_layer_forward.h:117
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::input
InputType input
Definition: concat_layer_forward.h:127
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: concat_layer_forward.h:156
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getResult
ResultPtr getResult()
Definition: concat_layer_forward.h:198
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::clone
DAAL_DEPRECATED services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: concat_layer_forward.h:224
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::layers::concat::forward::interface1::Batch::getLayerResult
DAAL_DEPRECATED layers::forward::ResultPtr getLayerResult() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:188
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getLayerParameter
virtual DAAL_DEPRECATED_VIRTUAL ParameterType * getLayerParameter() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:181
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::allocateResult
virtual DAAL_DEPRECATED_VIRTUAL services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:235