Class Dropout
Applies Dropout to the input. Dropout consists in randomly setting a fraction rate of input units to 0 at each update during training time, which helps prevent overfitting.
Inherited Members
Namespace: SiaNet.Layers
Assembly: SiaNet.dll
Syntax
public class Dropout : BaseLayer
Constructors
| Improve this Doc View SourceDropout(Single)
Initializes a new instance of the Dropout class.
Declaration
public Dropout(float rate)
Parameters
Type | Name | Description |
---|---|---|
System.Single | rate | float between 0 and 1. Fraction of the input units to drop.. |
Properties
| Improve this Doc View SourceRate
float between 0 and 1. Fraction of the input units to drop.
Declaration
public float Rate { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The rate. |
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. |