SiaNet/Layers/Core/Dropout.cs
/// <summary>
/// Forwards the inputs and compute the output
/// </summary>
/// <param name="x">The input tensor for this layer.</param>
Forwards the inputs and compute the output
Forwards the inputs and compute the output
public override void Forward(Tensor x)
        {
            base.Forward(x);
            var p = 1 - Rate;
            if (noise == null)
            {
                noise = K.RandomBernoulli(x.Shape, p);
            }
            Output = noise * p;
        }
public override void Forward ( Tensor x ) { base . Forward ( x ) ; var p = 1 - Rate ; if ( noise == null ) { noise = K . RandomBernoulli ( x . Shape , p ) ; } Output = noise * p ; }
Forwards the inputs and compute the output
Forwards the inputs and compute the output
x
Tensor
The input tensor for this layer.
The input tensor for this layer .