Class Elu
Exponential linear unit activation function: x if x > 0 and alpha * (exp(x)-1) if x < 0.
Inherited Members
Namespace: SiaNet.Layers.Activations
Assembly: SiaNet.dll
Syntax
public class Elu : BaseLayer
Constructors
| Improve this Doc View SourceElu(Single)
Initializes a new instance of the Elu class.
Declaration
public Elu(float alpha = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.Single | alpha | Slope of the negative section. |
Properties
| Improve this Doc View SourceAlpha
Slope of the negative section
Declaration
public float Alpha { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The alpha. |
Methods
| Improve this Doc View SourceBackward(Tensor)
Calculate the gradient of this layer function
Declaration
public override void Backward(Tensor outputgrad)
Parameters
Type | Name | Description |
---|---|---|
Tensor | outputgrad | The calculated output grad from previous layer. |
Overrides
| Improve this Doc View SourceForward(Tensor)
Forwards the inputs and compute the output
Declaration
public override void Forward(Tensor x)
Parameters
Type | Name | Description |
---|---|---|
Tensor | x | The input tensor for this layer. |