48 #ifndef __CONCAT_LAYER_FORWARD_H__
49 #define __CONCAT_LAYER_FORWARD_H__
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/tensor.h"
53 #include "services/daal_defines.h"
54 #include "algorithms/neural_networks/layers/layer.h"
55 #include "algorithms/neural_networks/layers/concat/concat_layer_types.h"
56 #include "algorithms/neural_networks/layers/concat/concat_layer_forward_types.h"
62 namespace neural_networks
93 template<
typename algorithmFPType, Method method, CpuType cpu>
94 class DAAL_EXPORT BatchContainer :
public layers::forward::LayerContainerIfaceImpl
102 BatchContainer(daal::services::Environment::env *daalEnv);
110 services::Status compute() DAAL_C11_OVERRIDE;
131 template<
typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
132 class Batch :
public layers::forward::LayerIfaceImpl
135 typedef layers::forward::LayerIfaceImpl super;
136 Parameter ¶meter;
143 Batch(
size_t concatDimension = 0) : _defaultParameter(concatDimension), parameter(_defaultParameter)
153 Batch(Parameter& parameter) : parameter(parameter), _defaultParameter(parameter)
163 Batch(
const Batch<algorithmFPType, method> &other) : super(other),
164 _defaultParameter(other.parameter), parameter(_defaultParameter), input(other.input)
173 virtual int getMethod() const DAAL_C11_OVERRIDE {
return(
int) method; }
179 virtual Input *getLayerInput() DAAL_C11_OVERRIDE {
return &input; }
185 virtual Parameter *getLayerParameter() DAAL_C11_OVERRIDE {
return ¶meter; };
191 layers::forward::ResultPtr getLayerResult() DAAL_C11_OVERRIDE
200 ResultPtr getResult()
211 services::Status setResult(
const ResultPtr& result)
213 DAAL_CHECK(result, services::ErrorNullResult)
215 _res = _result.get();
216 return services::Status();
224 services::SharedPtr<Batch<algorithmFPType, method> > clone()
const
226 return services::SharedPtr<Batch<algorithmFPType, method> >(cloneImpl());
234 virtual services::Status allocateResult() DAAL_C11_OVERRIDE
236 services::Status s = this->_result->template allocate<algorithmFPType>(&(this->input), ¶meter, (
int) method);
237 this->_res = this->_result.get();
242 virtual Batch<algorithmFPType, method> *cloneImpl() const DAAL_C11_OVERRIDE
244 return new Batch<algorithmFPType, method>(*this);
249 Analysis<batch>::_ac =
new __DAAL_ALGORITHM_LAYER_CONTAINER(BatchContainer, algorithmFPType, method)(&_env);
252 _result.reset(
new Result());
257 Parameter _defaultParameter;
261 using interface1::BatchContainer;
262 using interface1::Batch;
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::parameter
Parameter & parameter
Definition: concat_layer_forward.h:136
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getMethod
virtual int getMethod() const DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:173
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::allocateResult
virtual services::Status allocateResult() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:234
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
Batch(size_t concatDimension=0)
Definition: concat_layer_forward.h:143
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getLayerResult
layers::forward::ResultPtr getLayerResult() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:191
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getLayerParameter
virtual Parameter * getLayerParameter() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:185
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::clone
services::SharedPtr< Batch< algorithmFPType, method > > clone() const
Definition: concat_layer_forward.h:224
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
Batch(const Batch< algorithmFPType, method > &other)
Definition: concat_layer_forward.h:163
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::setResult
services::Status setResult(const ResultPtr &result)
Definition: concat_layer_forward.h:211
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getResult
ResultPtr getResult()
Definition: concat_layer_forward.h:200
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::Batch
Batch(Parameter ¶meter)
Definition: concat_layer_forward.h:153
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::getLayerInput
virtual Input * getLayerInput() DAAL_C11_OVERRIDE
Definition: concat_layer_forward.h:179
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::layers::concat::forward::interface1::Batch
Computes the results of the forward concat layer in the batch processing mode.
Definition: concat_layer_forward.h:132
daal::algorithms::neural_networks::layers::concat::forward::interface1::Batch::input
Input input
Definition: concat_layer_forward.h:137
daal::services::ErrorNullResult
Definition: error_indexes.h:122
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:94