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

softmax_cross_layer.h
1 /* file: softmax_cross_layer.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 the softmax cross layer.
19 //--
20 */
21 
22 #ifndef __NEURAL_NENTWORK_LOSS_SOFTMAX_CROSS_LAYER_H__
23 #define __NEURAL_NENTWORK_LOSS_SOFTMAX_CROSS_LAYER_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/tensor.h"
27 #include "services/daal_defines.h"
28 #include "algorithms/neural_networks/layers/layer.h"
29 #include "algorithms/neural_networks/layers/loss/loss_layer.h"
30 #include "algorithms/neural_networks/layers/loss/softmax_cross_layer_types.h"
31 #include "algorithms/neural_networks/layers/loss/softmax_cross_layer_forward.h"
32 #include "algorithms/neural_networks/layers/loss/softmax_cross_layer_backward.h"
33 
34 namespace daal
35 {
36 namespace algorithms
37 {
38 namespace neural_networks
39 {
40 namespace layers
41 {
42 namespace loss
43 {
47 namespace softmax_cross
48 {
49 namespace interface1
50 {
71 template<typename algorithmFPType = DAAL_ALGORITHM_FP_TYPE, Method method = defaultDense>
72 class Batch : public loss::Batch
73 {
74 public:
76  Batch()
77  {
78  forward::Batch<algorithmFPType, method> *forwardLayerObject = new forward::Batch<algorithmFPType, method>(parameter);
79  backward::Batch<algorithmFPType, method> *backwardLayerObject = new backward::Batch<algorithmFPType, method>(parameter);
80 
81  LayerIface::forwardLayer = services::SharedPtr<forward::Batch<algorithmFPType, method> >(forwardLayerObject);
82  LayerIface::backwardLayer = services::SharedPtr<backward::Batch<algorithmFPType, method> >(backwardLayerObject);
83  };
84 
85  Parameter parameter;
86 };
88 } // namespace interface1
89 using interface1::Batch;
90 
91 } // namespace softmax_cross
92 } // namespace loss
93 } // namespace layers
94 } // namespace neural_networks
95 } // namespace algorithms
96 } // namespace daal
97 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::neural_networks::layers::loss::softmax_cross::interface1::Batch
Provides methods for the softmax cross-entropy layer in the batch processing mode.
Definition: softmax_cross_layer.h:72
daal::algorithms::neural_networks::layers::loss::softmax_cross::interface1::Batch::Batch
Batch()
Definition: softmax_cross_layer.h:76
daal_defines.h
daal::algorithms::neural_networks::layers::loss::interface1::Batch
Provides methods for the loss layer in the batch processing mode.
Definition: loss_layer.h:66
daal::algorithms::neural_networks::layers::loss::softmax_cross::interface1::Batch::parameter
Parameter parameter
Definition: softmax_cross_layer.h:83
daal::algorithms::neural_networks::layers::loss::softmax_cross::interface1::Parameter
Parameters for the softmax cross-entropy layer.
Definition: softmax_cross_layer_types.h:82

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