C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

layer_descriptor.h
1 /* file: layer_descriptor.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of neural network layer descriptor.
19 //--
20 */
21 
22 #ifndef __LAYER_DESCRIPTOR_H__
23 #define __LAYER_DESCRIPTOR_H__
24 
25 #include "algorithms/neural_networks/layers/layer.h"
26 
27 namespace daal
28 {
29 namespace algorithms
30 {
31 namespace neural_networks
32 {
33 namespace layers
34 {
35 namespace interface1
36 {
45 class LayerDescriptor
46 {
47 public:
48  DAAL_NEW_DELETE();
49 
51  LayerDescriptor(): _index(0) {}
52 
58  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_): _index(index_), _layer(layer_){}
59 
67  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_):
68  _index(index_), _layer(layer_), _nextLayers(nextLayers_) {};
69 
71  LayerDescriptor(const LayerDescriptor& other) : _index(other._index), _layer(other._layer), _nextLayers(other._nextLayers){}
72 
77  size_t index() const { return _index; }
78 
83  services::Status addNext(size_t index)
84  {
85  _nextLayers.add(index);
86  return services::Status();
87  }
88 
93  const layers::LayerIfacePtr & layer() const { return _layer; }
94 
99  const NextLayers & nextLayers() const { return _nextLayers; }
100 
101 private:
102  layers::LayerIfacePtr _layer;
103  NextLayers _nextLayers;
104  size_t _index;
105 };
107 } // interface1
108 using interface1::LayerDescriptor;
109 
110 } // namespace layers
111 } // namespace neural_networks
112 } // namespace algorithms
113 } // namespace daal
114 
115 #endif
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::nextLayers
const NextLayers & nextLayers() const
Definition: layer_descriptor.h:99
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:45
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::addNext
services::Status addNext(size_t index)
Definition: layer_descriptor.h:83
daal::algorithms::neural_networks::layers::interface1::NextLayers
Contains list of layer indices of layers following the current layer.
Definition: layer_types.h:114
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::index
size_t index() const
Definition: layer_descriptor.h:77
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_)
Definition: layer_descriptor.h:67
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor()
Definition: layer_descriptor.h:51
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::layer
const layers::LayerIfacePtr & layer() const
Definition: layer_descriptor.h:93
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_)
Definition: layer_descriptor.h:58
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const LayerDescriptor &other)
Definition: layer_descriptor.h:71
daal::algorithms::neural_networks::layers::interface1::NextLayers::add
void add(size_t index)
Definition: layer_types.h:256

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