C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

layer_descriptor.h
1 /* file: layer_descriptor.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Implementation of neural network layer descriptor.
21 //--
22 */
23 
24 #ifndef __LAYER_DESCRIPTOR_H__
25 #define __LAYER_DESCRIPTOR_H__
26 
27 #include "algorithms/neural_networks/layers/layer.h"
28 
29 namespace daal
30 {
31 namespace algorithms
32 {
33 namespace neural_networks
34 {
35 namespace layers
36 {
37 namespace interface1
38 {
48 class LayerDescriptor
49 {
50 public:
51  DAAL_NEW_DELETE();
52 
57  LayerDescriptor(): _index(0) {}
58 
65  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_): _index(index_), _layer(layer_){}
66 
75  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_):
76  _index(index_), _layer(layer_), _nextLayers(nextLayers_) {};
77 
82  DAAL_DEPRECATED LayerDescriptor(const LayerDescriptor& other) : _index(other._index), _layer(other._layer), _nextLayers(other._nextLayers){}
83 
89  size_t index() const { return _index; }
90 
96  services::Status addNext(size_t index)
97  {
98  _nextLayers.add(index);
99  return services::Status();
100  }
101 
107  const layers::LayerIfacePtr & layer() const { return _layer; }
108 
114  const NextLayers & nextLayers() const { return _nextLayers; }
115 
116 private:
117  layers::LayerIfacePtr _layer;
118  NextLayers _nextLayers;
119  size_t _index;
120 };
122 } // interface1
123 using interface1::LayerDescriptor;
124 
125 } // namespace layers
126 } // namespace neural_networks
127 } // namespace algorithms
128 } // namespace daal
129 
130 #endif
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::LayerDescriptor::LayerDescriptor
DAAL_DEPRECATED LayerDescriptor(const LayerDescriptor &other)
Definition: layer_descriptor.h:82
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::addNext
services::Status addNext(size_t index)
Definition: layer_descriptor.h:96
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::nextLayers
const NextLayers & nextLayers() const
Definition: layer_descriptor.h:114
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor()
Definition: layer_descriptor.h:57
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::index
size_t index() const
Definition: layer_descriptor.h:89
daal::algorithms::neural_networks::layers::interface1::NextLayers::add
void add(size_t index)
Definition: layer_types.h:278
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::layer
const layers::LayerIfacePtr & layer() const
Definition: layer_descriptor.h:107
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor
Class defining descriptor for layer on both forward and backward stages and its parameters.
Definition: layer_descriptor.h:48
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_)
Definition: layer_descriptor.h:75
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_)
Definition: layer_descriptor.h:65

For more complete information about compiler optimizations, see our Optimization Notice.