Backends/SiaNet.Backend.Torch/TypeGeneration.cs
/// <summary>
///   Does a linear interpolation of two tensors based on a scalar weight and returns the resulting tensor.
/// </summary>
/// <param name="other">The right-hand-side operand.</param>
/// <param name="weight">The scale factor.</param>
/// <returns>The tensor resulting from the linear interpolation.</returns>
/// <remarks>
///   The element-wise calculation is: result = this + scale * (this - other)
/// </remarks>
Does a linear interpolation of two tensors based on a scalar weight and returns the resulting tensor.
Does a linear interpolation of two tensors based on a scalar weight and returns the resulting tensor .
public FloatTensor LERP (FloatTensor other, float weight)
        {
            if (other == null)
                throw new ArgumentNullException (nameof (other));
            var result = new FloatTensor();
            THFloatTensor_lerp (result.handle, this.handle, other.handle, weight);
            return result;
        }
public FloatTensor LERP ( FloatTensor other , float weight ) { if ( other == null ) throw new ArgumentNullException ( nameof ( other ) ) ; var result = new FloatTensor ( ) ; THFloatTensor_lerp ( result . handle , this . handle , other . handle , weight ) ; return result ; }
Does a linear interpolation of two tensors based on a scalar weight and returns the resulting tensor.
Does a linear interpolation of two tensors based on a scalar weight and returns the resulting tensor .
The tensor resulting from the linear interpolation.
The tensor resulting from the linear interpolation .
other
FloatTensor
The right-hand-side operand.
The right - hand - side operand .
weight
float
The scale factor.
The scale factor .
remarks
The element-wise calculation is: result = this + scale * (this - other)
The element - wise calculation is : result = this + scale * ( this - other )