24 #ifndef __LAYERS_TYPES_H__
25 #define __LAYERS_TYPES_H__
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/tensor.h"
29 #include "services/daal_defines.h"
30 #include "services/collection.h"
31 #include "data_management/data/data_collection.h"
32 #include "algorithms/neural_networks/initializers/initializer.h"
33 #include "algorithms/neural_networks/initializers/uniform/uniform_initializer.h"
42 namespace neural_networks
63 lastLayerInputLayout = collectionInput
70 enum LayerResultLayout
74 lastLayerResultLayout = collectionResult
87 class DAAL_EXPORT Parameter:
public daal::algorithms::Parameter
94 DAAL_DEPRECATED Parameter();
97 initializers::InitializerIfacePtr weightsInitializer;
99 initializers::InitializerIfacePtr biasesInitializer;
101 bool predictionStage;
103 bool propagateGradient;
105 bool weightsAndBiasesInitialized;
107 bool allowInplaceComputation;
113 typedef data_management::KeyValueDataCollection LayerData;
114 typedef services::SharedPtr<LayerData> LayerDataPtr;
127 NextLayers() : _indices(0)
136 NextLayers(
const NextLayers &other) : _indices(other._indices)
144 DAAL_DEPRECATED NextLayers(
const size_t index1) : _indices()
146 _indices.push_back(index1);
155 DAAL_DEPRECATED NextLayers(
const size_t index1,
const size_t index2) : _indices()
157 _indices.push_back(index1);
158 _indices.push_back(index2);
168 DAAL_DEPRECATED NextLayers(
const size_t index1,
const size_t index2,
const size_t index3) : _indices()
170 _indices.push_back(index1);
171 _indices.push_back(index2);
172 _indices.push_back(index3);
183 DAAL_DEPRECATED NextLayers(
const size_t index1,
const size_t index2,
const size_t index3,
const size_t index4) : _indices()
185 _indices.push_back(index1);
186 _indices.push_back(index2);
187 _indices.push_back(index3);
188 _indices.push_back(index4);
200 DAAL_DEPRECATED NextLayers(
const size_t index1,
const size_t index2,
const size_t index3,
const size_t index4,
201 const size_t index5) : _indices()
203 _indices.push_back(index1);
204 _indices.push_back(index2);
205 _indices.push_back(index3);
206 _indices.push_back(index4);
207 _indices.push_back(index5);
220 DAAL_DEPRECATED NextLayers(
const size_t index1,
const size_t index2,
const size_t index3,
const size_t index4,
const size_t index5,
221 const size_t index6) : _indices()
223 _indices.push_back(index1);
224 _indices.push_back(index2);
225 _indices.push_back(index3);
226 _indices.push_back(index4);
227 _indices.push_back(index5);
228 _indices.push_back(index6);
234 virtual ~NextLayers()
242 size_t size()
const {
return _indices.size(); }
250 DAAL_DEPRECATED
size_t & operator [] (
size_t index)
252 return _indices[index];
261 const size_t & operator [] (
size_t index)
const
263 return _indices[index];
271 void push_back(
size_t index) { _indices.push_back(index); }
278 void add(
size_t index) { _indices.push_back(index); }
281 services::Collection<size_t> _indices;
285 using interface1::LayerData;
286 using interface1::LayerDataPtr;
287 using interface1::NextLayers;
288 using interface1::Parameter;
daal::algorithms::neural_networks::layers::interface1::NextLayers::operator[]
DAAL_DEPRECATED size_t & operator[](size_t index)
Definition: layer_types.h:250
daal::algorithms::neural_networks::layers::interface1::Parameter::propagateGradient
bool propagateGradient
Definition: layer_types.h:103
daal::algorithms::neural_networks::layers::interface1::NextLayers
Contains list of layer indices of layers following the current layer.
Definition: layer_types.h:120
daal::algorithms::neural_networks::layers::interface1::Parameter::biasesInitializer
initializers::InitializerIfacePtr biasesInitializer
Definition: layer_types.h:99
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
NextLayers()
Constructs empty list of layer indices of layers following the current layer.
Definition: layer_types.h:127
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1, const size_t index2, const size_t index3)
Constructs the list of layer indices from three indices of the next layers.
Definition: layer_types.h:168
daal::algorithms::neural_networks::layers::interface1::Parameter::weightsInitializer
initializers::InitializerIfacePtr weightsInitializer
Definition: layer_types.h:97
daal::algorithms::neural_networks::layers::LayerInputLayout
LayerInputLayout
Definition: layer_types.h:59
daal::algorithms::neural_networks::layers::interface1::NextLayers::size
size_t size() const
Definition: layer_types.h:242
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1, const size_t index2)
Constructs the list of layer indices from two indices of the next layers.
Definition: layer_types.h:155
daal::algorithms::neural_networks::layers::interface1::NextLayers::push_back
void push_back(size_t index)
Definition: layer_types.h:271
daal::algorithms::neural_networks::layers::interface1::NextLayers::add
void add(size_t index)
Definition: layer_types.h:278
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
NextLayers(const NextLayers &other)
Constructs the list of layer indices by copying the indices from another list of layer indices...
Definition: layer_types.h:136
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1, const size_t index2, const size_t index3, const size_t index4, const size_t index5)
Constructs the list of layer indices from five indices of the next layers.
Definition: layer_types.h:200
daal::algorithms::neural_networks::layers::interface1::LayerData
data_management::KeyValueDataCollection LayerData
Contains extra input and output object of neural network layer.
Definition: layer_types.h:113
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:62
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1)
Constructs the list of layer indices from one index of the next layer.
Definition: layer_types.h:144
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1, const size_t index2, const size_t index3, const size_t index4, const size_t index5, const size_t index6)
Constructs the list of layer indices from six indices of the next layers.
Definition: layer_types.h:220
daal::algorithms::neural_networks::layers::interface1::NextLayers::NextLayers
DAAL_DEPRECATED NextLayers(const size_t index1, const size_t index2, const size_t index3, const size_t index4)
Constructs the list of layer indices from four indices of the next layers.
Definition: layer_types.h:183
daal::algorithms::neural_networks::layers::interface1::Parameter
Definition: layer_types.h:87
daal::algorithms::neural_networks::layers::interface1::Parameter::allowInplaceComputation
bool allowInplaceComputation
Definition: layer_types.h:107
daal::algorithms::neural_networks::layers::interface1::Parameter::predictionStage
bool predictionStage
Definition: layer_types.h:101
daal::algorithms::neural_networks::layers::LayerResultLayout
LayerResultLayout
Definition: layer_types.h:70
daal::algorithms::neural_networks::layers::interface1::Parameter::weightsAndBiasesInitialized
bool weightsAndBiasesInitialized
Definition: layer_types.h:105