Poplar and PopLibs
NonLinearityDef.hpp
Go to the documentation of this file.
1// Copyright (c) 2016 Graphcore Ltd. All rights reserved.
6#ifndef popnn_NonLinearityDef_hpp
7#define popnn_NonLinearityDef_hpp
8
9namespace popnn {
10
11enum class NonLinearityType {
14 SIGMOID,
21 RELU,
24 TANH,
30 GELU,
31 // SWISH:
32 // * y = x / (1 + e^(-x))
33 SWISH,
37 SOFTMAX,
43};
44
45} // end namespace popnn
46
47#endif // popnn_NonLinearityDef_hpp
Functions used in neural networks.
Definition: BatchNorm.hpp:14
NonLinearityType
Definition: NonLinearityDef.hpp:11
@ TANH
Hyperbolic tangent:
@ SOFTMAX_STABLE
Same as SOFTMAX, but slower more numerically stable algorithm used.
@ HARD_SIGMOID
Hard Sigmoid:
@ GELU
Gaussian Error Linear Unit:
@ SOFTMAX_SCALED
Same as SOFTMAX, but slower more numerically stable algorithm used.
@ RELU
Rectified Linear Unit: