C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 2

layer_descriptor.h
1 /* file: layer_descriptor.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Implementation of neural network layer descriptor.
45 //--
46 */
47 
48 #ifndef __LAYER_DESCRIPTOR_H__
49 #define __LAYER_DESCRIPTOR_H__
50 
51 #include "algorithms/neural_networks/layers/layer.h"
52 
53 namespace daal
54 {
55 namespace algorithms
56 {
57 namespace neural_networks
58 {
59 namespace layers
60 {
61 namespace interface1
62 {
71 class LayerDescriptor
72 {
73 public:
74  DAAL_NEW_DELETE();
75 
77  LayerDescriptor(): _index(0) {}
78 
84  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_): _index(index_), _layer(layer_){}
85 
93  LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_):
94  _index(index_), _layer(layer_), _nextLayers(nextLayers_) {};
95 
97  LayerDescriptor(const LayerDescriptor& other) : _index(other._index), _layer(other._layer), _nextLayers(other._nextLayers){}
98 
103  size_t index() const { return _index; }
104 
109  services::Status addNext(size_t index)
110  {
111  _nextLayers.add(index);
112  return services::Status();
113  }
114 
119  const layers::LayerIfacePtr & layer() const { return _layer; }
120 
125  const NextLayers & nextLayers() const { return _nextLayers; }
126 
127 private:
128  layers::LayerIfacePtr _layer;
129  NextLayers _nextLayers;
130  size_t _index;
131 };
133 } // interface1
134 using interface1::LayerDescriptor;
135 
136 } // namespace layers
137 } // namespace neural_networks
138 } // namespace algorithms
139 } // namespace daal
140 
141 #endif
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:71
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::layer
const layers::LayerIfacePtr & layer() const
Definition: layer_descriptor.h:119
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::addNext
services::Status addNext(size_t index)
Definition: layer_descriptor.h:109
daal::algorithms::neural_networks::layers::interface1::NextLayers
Contains list of layer indices of layers following the current layer.
Definition: layer_types.h:140
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::nextLayers
const NextLayers & nextLayers() const
Definition: layer_descriptor.h:125
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_, const NextLayers &nextLayers_)
Definition: layer_descriptor.h:93
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor()
Definition: layer_descriptor.h:77
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::index
size_t index() const
Definition: layer_descriptor.h:103
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const size_t index_, const layers::LayerIfacePtr &layer_)
Definition: layer_descriptor.h:84
daal::algorithms::neural_networks::layers::interface1::LayerDescriptor::LayerDescriptor
LayerDescriptor(const LayerDescriptor &other)
Definition: layer_descriptor.h:97
daal::algorithms::neural_networks::layers::interface1::NextLayers::add
void add(size_t index)
Definition: layer_types.h:282

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