Show / Hide Table of Contents

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.

Inheritance
System.Object
BaseLayer
PRelu
Inherited Members
BaseLayer.Params
BaseLayer.Input
BaseLayer.Output
BaseLayer.Name
BaseLayer.SkipPred
BaseLayer.Item[String]
BaseLayer.BuildParam(String, Int64[], DataType, BaseInitializer, BaseConstraint, BaseRegularizer, Boolean)
Namespace: SiaNet.Layers.Activations
Assembly: SiaNet.dll
Syntax
public class PRelu : BaseLayer

Constructors

| Improve this Doc View Source

PRelu(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 Source

AlphaConstraint

Gets or sets the constraint function for the alpha parameter.

Declaration
public BaseConstraint AlphaConstraint { get; set; }
Property Value
Type Description
BaseConstraint

The alpha constraint.

| Improve this Doc View Source

AlphaInitializer

Gets or sets the initializer for the alpha parameter.

Declaration
public BaseInitializer AlphaInitializer { get; set; }
Property Value
Type Description
BaseInitializer

The alpha initializer.

| Improve this Doc View Source

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 Source

Backward(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
BaseLayer.Backward(Tensor)
| Improve this Doc View Source

Forward(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.

Overrides
BaseLayer.Forward(Tensor)

See Also

BaseLayer
  • Improve this Doc
  • View Source
Back to top Generated by DocFX