Class PRelu
Parametric Rectified Linear Unit.
It follows: f(x) = alpha* x for x< 0, f(x) = x for x >= 0, where alpha is a learned array with the same shape as x.
Inherited Members
Namespace: SiaNet.Layers.Activations
Assembly: SiaNet.dll
Syntax
public class PRelu : BaseLayer
Constructors
| Improve this Doc View SourcePRelu(BaseInitializer, BaseRegularizer, BaseConstraint, Int64[])
Initializes a new instance of the PRelu class.
Declaration
public PRelu(BaseInitializer alphaInitializer = null, BaseRegularizer alphaRegularizer = null, BaseConstraint alphaConstraint = null, params long[] sharedAxes)
Parameters
Type | Name | Description |
---|---|---|
BaseInitializer | alphaInitializer | The alpha initializer. |
BaseRegularizer | alphaRegularizer | The alpha regularizer. |
BaseConstraint | alphaConstraint | The alpha constraint. |
System.Int64[] | sharedAxes | The shared axes. |
Properties
| Improve this Doc View SourceAlphaConstraint
Gets or sets the constraint function for the alpha parameter.
Declaration
public BaseConstraint AlphaConstraint { get; set; }
Property Value
Type | Description |
---|---|
BaseConstraint | The alpha constraint. |
AlphaInitializer
Gets or sets the initializer for the alpha parameter.
Declaration
public BaseInitializer AlphaInitializer { get; set; }
Property Value
Type | Description |
---|---|
BaseInitializer | The alpha initializer. |
AlphaRegularizer
Gets or sets the regularizer function for alpha parameter.
Declaration
public BaseRegularizer AlphaRegularizer { get; set; }
Property Value
Type | Description |
---|---|
BaseRegularizer | The alpha regularizer. |
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. |