docs.unity3d.com
    Show / Hide Table of Contents

    Class GPUPixelOps

    Represents a GPUPixel backend ops.

    Inheritance
    Object
    CPUOps
    GPUPixelOps
    Inherited Members
    CPUOps.GlobalAverageVariancePool(TensorFloat, TensorFloat, Int32)
    CPUOps.InstanceNormalization(TensorFloat, TensorFloat, TensorFloat, Single)
    CPUOps.AxisNormalization(TensorFloat, TensorFloat, TensorFloat, Single)
    CPUOps.Cast(Tensor, DataType)
    CPUOps.IsInf(TensorFloat, Boolean, Boolean)
    CPUOps.PRelu(TensorFloat, TensorFloat)
    CPUOps.Shrink(TensorFloat, Single, Single)
    CPUOps.Einsum(String, TensorFloat[])
    CPUOps.Transpose(Tensor)
    CPUOps.Pow(TensorFloat, TensorInt)
    CPUOps.Where(TensorInt, Tensor, Tensor)
    CPUOps.Tile(Tensor, Int32[])
    CPUOps.ConstantOfShape(TensorShape, Int32)
    CPUOps.CompressWithIndices(Tensor, TensorInt, Int32, Int32)
    CPUOps.Gather(Tensor, TensorInt, Int32)
    CPUOps.GatherElements(Tensor, TensorInt, Int32)
    CPUOps.GatherND(Tensor, TensorInt, Int32)
    CPUOps.ScatterElements(Tensor, TensorInt, Tensor, Int32, ScatterReductionMode)
    CPUOps.ScatterND(TensorFloat, TensorInt, TensorFloat, ScatterReductionMode)
    CPUOps.OneHot(TensorInt, Int32, Int32, Int32, Int32)
    CPUOps.TopK(TensorFloat, Int32, Int32, Boolean, Boolean)
    CPUOps.RoiAlign(TensorFloat, TensorFloat, TensorInt, RoiPoolingMode, Int32, Int32, Int32, Single)
    CPUOps.RandomNormal(TensorShape, Single, Single, Nullable<Single>)
    CPUOps.RandomUniform(TensorShape, Single, Single, Nullable<Single>)
    CPUOps.Bernoulli(TensorFloat, DataType, Nullable<Single>)
    CPUOps.MemCopy(Tensor, Tensor, Int32, Int32, Int32)
    CPUOps.MemCopyStride(Tensor, Tensor, Int32, Int32, Int32, Int32, Int32, Int32)
    CPUOps.SinglePassLSTM(TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorInt, TensorFloat, TensorFloat, TensorFloat, TensorFloat, RnnActivation[], Single[], Single[], Boolean, Single, Boolean, Int32, RnnLayout)
    CPUOps.PinToDevice(Tensor, Boolean)
    CPUOps.Add(TensorInt, TensorInt)
    CPUOps.Sub(TensorInt, TensorInt)
    CPUOps.Mul(TensorInt, TensorInt)
    CPUOps.Div(TensorInt, TensorInt)
    CPUOps.Greater(TensorFloat, TensorFloat)
    CPUOps.Greater(TensorInt, TensorInt)
    CPUOps.GreaterOrEqual(TensorFloat, TensorFloat)
    CPUOps.GreaterOrEqual(TensorInt, TensorInt)
    CPUOps.Less(TensorFloat, TensorFloat)
    CPUOps.LessOrEqual(TensorFloat, TensorFloat)
    CPUOps.Equal(TensorFloat, TensorFloat)
    CPUOps.Less(TensorInt, TensorInt)
    CPUOps.LessOrEqual(TensorInt, TensorInt)
    CPUOps.Equal(TensorInt, TensorInt)
    CPUOps.Or(TensorInt, TensorInt)
    CPUOps.And(TensorInt, TensorInt)
    CPUOps.Xor(TensorInt, TensorInt)
    CPUOps.Mod(TensorInt, TensorInt)
    CPUOps.FMod(TensorInt, TensorInt)
    CPUOps.Min(TensorInt[])
    CPUOps.Max(TensorInt[])
    CPUOps.Sum(TensorInt[])
    CPUOps.Abs(TensorInt)
    CPUOps.Neg(TensorInt)
    CPUOps.Sign(TensorFloat)
    CPUOps.Sign(TensorInt)
    CPUOps.IsNaN(TensorFloat)
    CPUOps.Cast(TensorInt)
    CPUOps.Cast(TensorFloat)
    CPUOps.Not(TensorInt)
    CPUOps.ReduceMin(TensorInt, Int32[], Boolean)
    CPUOps.ReduceMax(TensorInt, Int32[], Boolean)
    CPUOps.ReduceSum(TensorInt, Int32[], Boolean)
    CPUOps.ReduceSumSquare(TensorInt, Int32[], Boolean)
    CPUOps.ReduceProd(TensorInt, Int32[], Boolean)
    CPUOps.ReduceL1(TensorInt, Int32[], Boolean)
    CPUOps.ArgMax(TensorFloat, Int32, Boolean, Boolean)
    CPUOps.ArgMax(TensorInt, Int32, Boolean, Boolean)
    CPUOps.ArgMin(TensorFloat, Int32, Boolean, Boolean)
    CPUOps.ArgMin(TensorInt, Int32, Boolean, Boolean)
    CPUOps.Hardmax(TensorFloat, Int32)
    CPUOps.CumSum(TensorFloat, Int32, Boolean, Boolean)
    CPUOps.CumSum(TensorInt, Int32, Boolean, Boolean)
    CPUOps.Tril(Tensor, Int32)
    CPUOps.Triu(Tensor, Int32)
    CPUOps.Range(Single, Single, Single)
    CPUOps.Range(Int32, Int32, Int32)
    CPUOps.PostLayerCleanup()
    CPUOps.NewTensor(TensorShape, DataType, AllocScope)
    CPUOps.NewTensorFloat(TensorShape, AllocScope)
    CPUOps.NewTensorInt(TensorShape, AllocScope)
    CPUOps.NewOutputTensorFloat(TensorShape)
    CPUOps.NewOutputTensorInt(TensorShape)
    CPUOps.NewOutputTensor(TensorShape, DataType)
    CPUOps.NewTempTensorFloat(TensorShape)
    CPUOps.NewTempTensorInt(TensorShape)
    CPUOps.ResetAllocator(Boolean)
    CPUOps.Dispose()
    CPUOps.Compress(Tensor, TensorInt, Int32)
    CPUOps.NonMaxSuppression(TensorFloat, TensorFloat, Int32, Single, Single, CenterPointBox)
    CPUOps.LRN(TensorFloat, Single, Single, Single, Int32)
    CPUOps.Multinomial(TensorFloat, Int32, Nullable<Single>)
    CPUOps.NonZero(TensorFloat)
    CPUOps.NonZero(TensorInt)
    CPUOps.ScatterND(TensorInt, TensorInt, TensorInt, ScatterReductionMode)
    CPUOps.Shape(Tensor, Int32, Int32)
    CPUOps.Size(TensorShape)
    CPUOps.LSTM(TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorInt, TensorFloat, TensorFloat, TensorFloat, RnnDirection, RnnActivation[], Single[], Single[], Boolean, Single, RnnLayout)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis
    Syntax
    public class GPUPixelOps : CPUOps, IOps, IDisposable

    Constructors

    GPUPixelOps(ITensorAllocator)

    Initializes and returns an instance of GPUPixelOps.

    Declaration
    public GPUPixelOps(ITensorAllocator allocator = null)
    Parameters
    Type Name Description
    ITensorAllocator allocator

    Properties

    deviceType

    Returns the DeviceType for the ops.

    Declaration
    public override DeviceType deviceType { get; }
    Property Value
    Type Description
    DeviceType
    Overrides
    CPUOps.deviceType

    Methods

    Abs(TensorFloat)

    Computes an output tensor by applying the element-wise Abs math function: f(x) = f(x) = |x|.

    Declaration
    public override TensorFloat Abs(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Abs(TensorFloat)

    Acos(TensorFloat)

    Computes an output tensor by applying the element-wise Acos trigonometric function: f(x) = acos(x).

    Declaration
    public override TensorFloat Acos(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Acos(TensorFloat)

    Acosh(TensorFloat)

    Computes an output tensor by applying the element-wise Acosh trigonometric function: f(x) = acosh(x).

    Declaration
    public override TensorFloat Acosh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Acosh(TensorFloat)

    Add(TensorFloat, TensorFloat)

    Performs an element-wise Add math operation: f(a, b) = a + b.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Add(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Add(TensorFloat, TensorFloat)

    Asin(TensorFloat)

    Computes an output tensor by applying the element-wise Asin trigonometric function: f(x) = asin(x).

    Declaration
    public override TensorFloat Asin(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Asin(TensorFloat)

    Asinh(TensorFloat)

    Computes an output tensor by applying the element-wise Asinh trigonometric function: f(x) = asinh(x).

    Declaration
    public override TensorFloat Asinh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Asinh(TensorFloat)

    Atan(TensorFloat)

    Computes an output tensor by applying the element-wise Atan trigonometric function: f(x) = atan(x).

    Declaration
    public override TensorFloat Atan(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Atan(TensorFloat)

    Atanh(TensorFloat)

    Computes an output tensor by applying the element-wise Atanh trigonometric function: f(x) = atanh(x).

    Declaration
    public override TensorFloat Atanh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Atanh(TensorFloat)

    AveragePool(TensorFloat, Int32[], Int32[], Int32[])

    Calculates an output tensor by pooling the mean values of the input tensor across its spatial dimensions according to the given pool and stride values.

    Declaration
    public override TensorFloat AveragePool(TensorFloat X, int[] pool, int[] stride, int[] pad)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] pool

    The size of the kernel along each spatial axis.

    Int32[] stride

    The stride along each spatial axis.

    Int32[] pad

    The lower and upper padding values for each spatial dimension. For example, [pad_left, pad_right] for 1D, or [pad_top, pad_bottom, pad_left, pad_right] for 2D.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.AveragePool(TensorFloat, Int32[], Int32[], Int32[])

    Ceil(TensorFloat)

    Computes an output tensor by applying the element-wise Ceil math function: f(x) = ceil(x).

    Declaration
    public override TensorFloat Ceil(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Ceil(TensorFloat)

    Celu(TensorFloat, Single)

    Computes an output tensor by applying the element-wise Celu activation function: f(x) = max(0, x) + min(0, alpha * (exp(x / alpha) - 1)).

    Declaration
    public override TensorFloat Celu(TensorFloat X, float alpha)
    Parameters
    Type Name Description
    TensorFloat X
    Single alpha

    The alpha value to use for the Celu activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Celu(TensorFloat, Single)

    Clip(TensorFloat, Single, Single)

    Computes an output tensor by applying the element-wise Clip math function: f(x) = clamp(x, min, max).

    Declaration
    public override TensorFloat Clip(TensorFloat X, float min, float max)
    Parameters
    Type Name Description
    TensorFloat X
    Single min

    The lower clip value.

    Single max

    The upper clip value.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Clip(TensorFloat, Single, Single)

    Concat(Tensor[], Int32)

    Calculates an output tensor by concatenating the input tensors along a given axis.

    Declaration
    public override Tensor Concat(Tensor[] tensors, int axis)
    Parameters
    Type Name Description
    Tensor[] tensors

    The input tensors.

    Int32 axis

    The axis along which to concatenate the input tensors.

    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Concat(Tensor[], Int32)

    ConstantOfShape(TensorShape, Single)

    Generates a tensor with a given shape filled with a given value.

    Declaration
    public override TensorFloat ConstantOfShape(TensorShape X, float value)
    Parameters
    Type Name Description
    TensorShape X

    The input tensor shape.

    Single value

    The fill value.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ConstantOfShape(TensorShape, Single)

    Conv(TensorFloat, TensorFloat, TensorFloat, Int32, Int32[], Int32[], Int32[], FusableActivation)

    Applies a convolution filter to an input tensor.

    Declaration
    public override TensorFloat Conv(TensorFloat X, TensorFloat K, TensorFloat B, int groups, int[] stride, int[] pad, int[] dilation, FusableActivation fusedActivation)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    TensorFloat K

    The filter tensor.

    TensorFloat B

    The optional bias tensor.

    Int32 groups

    The number of groups that input channels and output channels are divided into.

    Int32[] stride

    The optional stride value for each spatial dimension of the filter.

    Int32[] pad

    The optional lower and upper padding values for each spatial dimension of the filter.

    Int32[] dilation

    The optional dilation value of each spatial dimension of the filter.

    FusableActivation fusedActivation

    The fused activation type to apply after the convolution.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Conv(TensorFloat, TensorFloat, TensorFloat, Int32, Int32[], Int32[], Int32[], FusableActivation)

    Conv2DTrans(TensorFloat, TensorFloat, TensorFloat, Int32[], Int32[], Int32[], FusableActivation)

    Applies a transpose convolution filter to an input tensor.

    Declaration
    public override TensorFloat Conv2DTrans(TensorFloat X, TensorFloat K, TensorFloat B, int[] stride, int[] pad, int[] outputAdjustment, FusableActivation fusedActivation)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    TensorFloat K

    The filter tensor.

    TensorFloat B

    The optional bias tensor.

    Int32[] stride

    The optional stride value for each spatial dimension of the filter.

    Int32[] pad

    The optional lower and upper padding values for each spatial dimension of the filter.

    Int32[] outputAdjustment

    The output padding value for each spatial dimension in the filter.

    FusableActivation fusedActivation

    The fused activation type to apply after the convolution.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Conv2DTrans(TensorFloat, TensorFloat, TensorFloat, Int32[], Int32[], Int32[], FusableActivation)

    Copy(Tensor)

    Creates a copy of a given input tensor with the same shape and values.

    Declaration
    public override Tensor Copy(Tensor X)
    Parameters
    Type Name Description
    Tensor X
    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Copy(Tensor)

    Cos(TensorFloat)

    Computes an output tensor by applying the element-wise Cos trigonometric function: f(x) = cos(x).

    Declaration
    public override TensorFloat Cos(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Cos(TensorFloat)

    Cosh(TensorFloat)

    Computes an output tensor by applying the element-wise Cosh trigonometric function: f(x) = cosh(x).

    Declaration
    public override TensorFloat Cosh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Cosh(TensorFloat)

    Dense(TensorFloat, TensorFloat, TensorFloat, FusableActivation)

    Performs a matrix multiplication operation: f(x, w, b) = X x W + B.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Dense(TensorFloat X, TensorFloat W, TensorFloat B, FusableActivation fusedActivation)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    TensorFloat W

    The weights tensor.

    TensorFloat B

    The bias tensor.

    FusableActivation fusedActivation

    The fused activation to apply to the output tensor after the dense operation.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Dense(TensorFloat, TensorFloat, TensorFloat, FusableActivation)

    DepthToSpace(TensorFloat, Int32, DepthToSpaceMode)

    Computes the output tensor by permuting data from depth into blocks of spatial data.

    Declaration
    public override TensorFloat DepthToSpace(TensorFloat X, int blocksize, DepthToSpaceMode mode)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32 blocksize

    The size of the blocks to move the depth data into.

    DepthToSpaceMode mode

    The ordering of the data in the output tensor as a DepthToSpaceMode.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.DepthToSpace(TensorFloat, Int32, DepthToSpaceMode)

    Div(TensorFloat, TensorFloat)

    Performs an element-wise Div math operation: f(a, b) = a / b.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Div(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Div(TensorFloat, TensorFloat)

    Elu(TensorFloat, Single)

    Computes an output tensor by applying the element-wise Elu activation function: f(x) = x if x >= 0, otherwise f(x) = alpha * (e^x - 1).

    Declaration
    public override TensorFloat Elu(TensorFloat X, float alpha)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Single alpha

    The alpha value to use for the Elu activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Elu(TensorFloat, Single)

    Erf(TensorFloat)

    Computes an output tensor by applying the element-wise Erf activation function: f(x) = erf(x).

    Declaration
    public override TensorFloat Erf(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Erf(TensorFloat)

    Exp(TensorFloat)

    Computes an output tensor by applying the element-wise Exp math function: f(x) = exp(x).

    Declaration
    public override TensorFloat Exp(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Exp(TensorFloat)

    Expand(Tensor, TensorShape)

    Calculates an output tensor by broadcasting the input tensor into a given shape.

    Declaration
    public override Tensor Expand(Tensor X, TensorShape newShape)
    Parameters
    Type Name Description
    Tensor X

    The input tensor.

    TensorShape newShape
    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Expand(Tensor, TensorShape)

    Floor(TensorFloat)

    Computes an output tensor by applying the element-wise Floor math function: f(x) = floor(x).

    Declaration
    public override TensorFloat Floor(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Floor(TensorFloat)

    FMod(TensorFloat, TensorFloat)

    Performs an element-wise Mod math operation: f(a, b) = a % b.

    The sign of the remainder is the same as the sign of the dividend, as in C#.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat FMod(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.FMod(TensorFloat, TensorFloat)

    Gelu(TensorFloat)

    Computes an output tensor by applying the element-wise Gelu activation function: f(x) = x / 2 * (1 + erf(x / sqrt(2))).

    Declaration
    public override TensorFloat Gelu(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Gelu(TensorFloat)

    GlobalAveragePool(TensorFloat)

    Calculates an output tensor by pooling the mean values of the input tensor across all of its spatial dimensions. The spatial dimensions of the output are size 1.

    Declaration
    public override TensorFloat GlobalAveragePool(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.GlobalAveragePool(TensorFloat)

    GlobalMaxPool(TensorFloat)

    Calculates an output tensor by pooling the maximum values of the input tensor across all of its spatial dimensions. The spatial dimensions of the output are size 1.

    Declaration
    public override TensorFloat GlobalMaxPool(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.GlobalMaxPool(TensorFloat)

    HardSigmoid(TensorFloat, Single, Single)

    Computes an output tensor by applying the element-wise HardSigmoid activation function: f(x) = clamp(alpha * x + beta, 0, 1).

    Declaration
    public override TensorFloat HardSigmoid(TensorFloat X, float alpha, float beta)
    Parameters
    Type Name Description
    TensorFloat X
    Single alpha

    The alpha value to use for the HardSigmoid activation function.

    Single beta

    The beta value to use for the HardSigmoid activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.HardSigmoid(TensorFloat, Single, Single)

    HardSwish(TensorFloat)

    Computes an output tensor by applying the element-wise HardSwish activation function: f(x) = x * max(0, min(1, 1/6 * x + 0.5)).

    Declaration
    public override TensorFloat HardSwish(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.HardSwish(TensorFloat)

    LeakyRelu(TensorFloat, Single)

    Computes an output tensor by applying the element-wise LeakyRelu activation function: f(x) = x if x >= 0, otherwise f(x) = alpha * x.

    Declaration
    public override TensorFloat LeakyRelu(TensorFloat X, float alpha)
    Parameters
    Type Name Description
    TensorFloat X
    Single alpha

    The alpha value to use for the LeakyRelu activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.LeakyRelu(TensorFloat, Single)

    Log(TensorFloat)

    Computes an output tensor by applying the element-wise Log math function: f(x) = log(x).

    Declaration
    public override TensorFloat Log(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Log(TensorFloat)

    LogSoftmax(TensorFloat, Int32)

    Computes an output tensor by applying the LogSoftmax activation function along an axis: f(x, axis) = log(Softmax(x, axis)).

    Declaration
    public override TensorFloat LogSoftmax(TensorFloat X, int axis)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32 axis

    The axis along which to apply the LogSoftmax activation function. The default value is -1.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.LogSoftmax(TensorFloat, Int32)

    MatMul(TensorFloat, TensorFloat)

    Performs a multi-dimensional matrix multiplication operation: f(a, b) = a x b.

    Declaration
    public override TensorFloat MatMul(TensorFloat X, TensorFloat Y)
    Parameters
    Type Name Description
    TensorFloat X

    The first input tensor.

    TensorFloat Y

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.MatMul(TensorFloat, TensorFloat)

    MatMul2D(TensorFloat, Boolean, TensorFloat, Boolean)

    Performs a matrix multiplication operation with optional transposes: f(a, b) = a' x b'.

    Declaration
    public override TensorFloat MatMul2D(TensorFloat X, bool xTranspose, TensorFloat Y, bool yTranspose)
    Parameters
    Type Name Description
    TensorFloat X

    The first input tensor.

    Boolean xTranspose

    Whether to transpose the first input tensor before performing the matrix multiplication.

    TensorFloat Y
    Boolean yTranspose

    Whether to transpose the second input tensor before performing the matrix multiplication.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.MatMul2D(TensorFloat, Boolean, TensorFloat, Boolean)

    Max(TensorFloat[])

    Performs an element-wise Max math operation: f(x1, x2 ... xn) = max(x1, x2 ... xn).

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Max(TensorFloat[] tensors)
    Parameters
    Type Name Description
    TensorFloat[] tensors

    The input tensors.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Max(TensorFloat[])

    MaxPool(TensorFloat, Int32[], Int32[], Int32[])

    Calculates an output tensor by pooling the maximum values of the input tensor across its spatial dimensions according to the given pool and stride values.

    Declaration
    public override TensorFloat MaxPool(TensorFloat X, int[] pool, int[] stride, int[] pad)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] pool

    The size of the kernel along each spatial axis.

    Int32[] stride

    The stride along each spatial axis.

    Int32[] pad

    The lower and upper padding values for each spatial dimension. For example, [pad_left, pad_right] for 1D, or [pad_top, pad_bottom, pad_left, pad_right] for 2D.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.MaxPool(TensorFloat, Int32[], Int32[], Int32[])

    Mean(TensorFloat[])

    Performs an element-wise Mean math operation: f(x1, x2 ... xn) = (x1 + x2 ... xn) / n.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Mean(TensorFloat[] tensors)
    Parameters
    Type Name Description
    TensorFloat[] tensors

    The input tensors.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Mean(TensorFloat[])

    MemSet(Tensor, Int32, Int32, Int32)

    Set values of O in indices [offset0, offsetO + length] to value

    Declaration
    protected override void MemSet(Tensor O, int value, int length = -1, int offsetO = 0)
    Parameters
    Type Name Description
    Tensor O
    Int32 value
    Int32 length
    Int32 offsetO
    Overrides
    CPUOps.MemSet(Tensor, Int32, Int32, Int32)

    Min(TensorFloat[])

    Performs an element-wise Min math operation: f(x1, x2 ... xn) = min(x1, x2 ... xn).

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Min(TensorFloat[] tensors)
    Parameters
    Type Name Description
    TensorFloat[] tensors

    The input tensors.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Min(TensorFloat[])

    Mul(TensorFloat, TensorFloat)

    Performs an element-wise Mul math operation: f(a, b) = a * b.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Mul(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Mul(TensorFloat, TensorFloat)

    Neg(TensorFloat)

    Computes an output tensor by applying the element-wise Neg math function: f(x) = -x.

    Declaration
    public override TensorFloat Neg(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Neg(TensorFloat)

    Pad(TensorFloat, Int32[], PadMode, Single)

    Calculates the output tensor by adding padding to the input tensor according to the given padding values and mode.

    Declaration
    public override TensorFloat Pad(TensorFloat X, int[] pad, PadMode padMode, float constant)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] pad

    The lower and upper padding values for each dimension.

    PadMode padMode

    The PadMode to use when padding. The default value is PadMode.Constant.

    Single constant

    The constant value to fill with when using PadMode.Constant. The default value is 0.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Pad(TensorFloat, Int32[], PadMode, Single)

    Pow(TensorFloat, TensorFloat)

    Performs an element-wise Pow math operation: f(a, b) = pow(a, b).

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Pow(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Pow(TensorFloat, TensorFloat)

    Reciprocal(TensorFloat)

    Computes an output tensor by applying the element-wise Reciprocal math function: f(x) = 1 / x.

    Declaration
    public override TensorFloat Reciprocal(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Reciprocal(TensorFloat)

    ReduceL1(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceL1 operation: f(x1, x2 ... xn) = |x1| + |x2| + ... + |xn|.

    Declaration
    public override TensorFloat ReduceL1(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceL1(TensorFloat, Int32[], Boolean)

    ReduceL2(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceL2 operation: f(x1, x2 ... xn) = sqrt(x1² + x2² + ... + xn²).

    Declaration
    public override TensorFloat ReduceL2(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceL2(TensorFloat, Int32[], Boolean)

    ReduceLogSum(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceLogSum operation: f(x1, x2 ... xn) = log(x1 + x2 + ... + xn).

    Declaration
    public override TensorFloat ReduceLogSum(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceLogSum(TensorFloat, Int32[], Boolean)

    ReduceLogSumExp(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceLogSumExp operation: f(x1, x2 ... xn) = log(e^x1 + e^x2 + ... + e^xn).

    Declaration
    public override TensorFloat ReduceLogSumExp(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceLogSumExp(TensorFloat, Int32[], Boolean)

    ReduceMax(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceMax operation: f(x1, x2 ... xn) = max(x1, x2, ... , xn).

    Declaration
    public override TensorFloat ReduceMax(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceMax(TensorFloat, Int32[], Boolean)

    ReduceMean(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceMean operation: f(x1, x2 ... xn) = (x1 + x2 + ... + xn) / n.

    Declaration
    public override TensorFloat ReduceMean(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceMean(TensorFloat, Int32[], Boolean)

    ReduceMin(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceMin operation: f(x1, x2 ... xn) = min(x1, x2, ... , xn).

    Declaration
    public override TensorFloat ReduceMin(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceMin(TensorFloat, Int32[], Boolean)

    ReduceProd(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceProd operation: f(x1, x2 ... xn) = x1 * x2 * ... * xn.

    Declaration
    public override TensorFloat ReduceProd(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceProd(TensorFloat, Int32[], Boolean)

    ReduceSum(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceSum operation: f(x1, x2 ... xn) = x1 + x2 + ... + xn.

    Declaration
    public override TensorFloat ReduceSum(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceSum(TensorFloat, Int32[], Boolean)

    ReduceSumSquare(TensorFloat, Int32[], Boolean)

    Reduces an input tensor along the given axes using the ReduceSumSquare operation: f(x1, x2 ... xn) = x1² + x2² + ... + xn².

    Declaration
    public override TensorFloat ReduceSumSquare(TensorFloat X, int[] axes, bool keepdim)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32[] axes

    The axes along which to reduce.

    Boolean keepdim

    Whether to keep the reduced axes in the output tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ReduceSumSquare(TensorFloat, Int32[], Boolean)

    Relu(TensorFloat)

    Computes an output tensor by applying the element-wise Relu activation function: f(x) = max(0, x).

    Declaration
    public override TensorFloat Relu(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Relu(TensorFloat)

    Relu6(TensorFloat)

    Computes an output tensor by applying the element-wise Relu6 activation function: f(x) = clamp(x, 0, 6).

    Declaration
    public override TensorFloat Relu6(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Relu6(TensorFloat)

    Reshape(Tensor, TensorShape)

    Calculates an output tensor by copying the data from the input tensor and using a given shape. The data from the input tensor is unchanged.

    Declaration
    public override Tensor Reshape(Tensor X, TensorShape newShape)
    Parameters
    Type Name Description
    Tensor X

    The input tensor.

    TensorShape newShape
    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Reshape(Tensor, TensorShape)

    Resize(TensorFloat, Single[], InterpolationMode, NearestMode, CoordTransformMode)

    Calculates an output tensor by resampling the input tensor along the spatial dimensions with given scales.

    Declaration
    public override TensorFloat Resize(TensorFloat X, float[] scale, InterpolationMode interpolationMode, NearestMode nearestMode = NearestMode.RoundPreferFloor, CoordTransformMode coordTransformMode = CoordTransformMode.HalfPixel)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Single[] scale

    The factor to scale each dimension by.

    InterpolationMode interpolationMode

    The InterpolationMode to use for the operation.

    NearestMode nearestMode

    The NearestMode to use for the operation when using InterpolationMode.NearestMode. The default is NearestMode.RoundPreferFloor.

    CoordTransformMode coordTransformMode

    The CoordTransformMode to use for the operation. The default is CoordTransformMode.HalfPixel.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Resize(TensorFloat, Single[], InterpolationMode, NearestMode, CoordTransformMode)

    Round(TensorFloat)

    Computes an output tensor by applying the element-wise Round math function: f(x) = round(x).

    If the fractional part is equal to 0.5, rounds to the nearest even integer.

    Declaration
    public override TensorFloat Round(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Round(TensorFloat)

    ScaleBias(TensorFloat, TensorFloat, TensorFloat)

    Computes the output tensor with an element-wise ScaleBias function: f(x, s, b) = x * s + b.

    Declaration
    public override TensorFloat ScaleBias(TensorFloat X, TensorFloat S, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    TensorFloat S

    The scale tensor.

    TensorFloat B

    The bias tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ScaleBias(TensorFloat, TensorFloat, TensorFloat)

    Selu(TensorFloat, Single, Single)

    Computes an output tensor by applying the element-wise Selu activation function: f(x) = gamma * x if x >= 0, otherwise f(x) = (alpha * e^x - alpha).

    Declaration
    public override TensorFloat Selu(TensorFloat X, float alpha, float gamma)
    Parameters
    Type Name Description
    TensorFloat X
    Single alpha

    The alpha value to use for the Selu activation function.

    Single gamma

    The alpha value to use for the Selu activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Selu(TensorFloat, Single, Single)

    Sigmoid(TensorFloat)

    Computes an output tensor by applying the element-wise Sigmoid activation function: f(x) = 1/(1 + e^(-x)).

    Declaration
    public override TensorFloat Sigmoid(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sigmoid(TensorFloat)

    Sin(TensorFloat)

    Computes an output tensor by applying the element-wise Sin trigonometric function: f(x) = sin(x).

    Declaration
    public override TensorFloat Sin(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sin(TensorFloat)

    Sinh(TensorFloat)

    Computes an output tensor by applying the element-wise Sinh trigonometric function: f(x) = sinh(x).

    Declaration
    public override TensorFloat Sinh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sinh(TensorFloat)

    Slice(Tensor, Int32[], Int32[], Int32[], Int32[])

    Calculates an output tensor by slicing the input tensor along given axes with given starts, ends, and steps.

    Declaration
    public override Tensor Slice(Tensor X, int[] starts, int[] ends, int[] axes, int[] steps)
    Parameters
    Type Name Description
    Tensor X

    The input tensor.

    Int32[] starts

    The start index along each axis.

    Int32[] ends

    The end index along each axis.

    Int32[] axes

    The axes along which to slice. If this is null, the layer slices all axes.

    Int32[] steps

    The step values for slicing. If this is null, the layer uses step size 1 throughout.

    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Slice(Tensor, Int32[], Int32[], Int32[], Int32[])

    Softmax(TensorFloat, Int32)

    Computes an output tensor by applying the Softmax activation function along an axis: f(x, axis) = exp(X) / ReduceSum(exp(X), axis).

    Declaration
    public override TensorFloat Softmax(TensorFloat X, int axis)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Int32 axis

    The axis along which to apply the Softmax activation function. The default value is -1.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Softmax(TensorFloat, Int32)

    Softplus(TensorFloat)

    Computes an output tensor by applying the element-wise Softplus activation function: f(x) = ln(e^x + 1).

    Declaration
    public override TensorFloat Softplus(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Softplus(TensorFloat)

    Softsign(TensorFloat)

    Computes an output tensor by applying the element-wise Softsign activation function: f(x) = x/(|x| + 1).

    Declaration
    public override TensorFloat Softsign(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Softsign(TensorFloat)

    SpaceToDepth(TensorFloat, Int32)

    Computes the output tensor by permuting data from blocks of spatial data into depth.

    Declaration
    public override TensorFloat SpaceToDepth(TensorFloat X, int blocksize)
    Parameters
    Type Name Description
    TensorFloat X
    Int32 blocksize

    The size of the blocks to move the depth data into.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.SpaceToDepth(TensorFloat, Int32)

    Split(Tensor, Int32, Int32, Int32)

    Calculates an output tensor by splitting the input tensor along a given axis between start and end.

    Declaration
    public override Tensor Split(Tensor X, int axis, int start, int end)
    Parameters
    Type Name Description
    Tensor X

    The input tensor.

    Int32 axis

    The axis along which to split the input tensor.

    Int32 start

    The inclusive start value for the split.

    Int32 end

    The exclusive end value for the split.

    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Split(Tensor, Int32, Int32, Int32)

    Sqrt(TensorFloat)

    Computes an output tensor by applying the element-wise Sqrt math function: f(x) = sqrt(x).

    Declaration
    public override TensorFloat Sqrt(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sqrt(TensorFloat)

    Square(TensorFloat)

    Computes an output tensor by applying the element-wise Square math function: f(x) = x * x.

    Declaration
    public override TensorFloat Square(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Square(TensorFloat)

    Sub(TensorFloat, TensorFloat)

    Performs an element-wise Sub math operation: f(a, b) = a - b.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Sub(TensorFloat A, TensorFloat B)
    Parameters
    Type Name Description
    TensorFloat A

    The first input tensor.

    TensorFloat B

    The second input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sub(TensorFloat, TensorFloat)

    Sum(TensorFloat[])

    Performs an element-wise Sum math operation: f(x1, x2 ... xn) = x1 + x2 ... xn.

    This supports numpy-style broadcasting of input tensors.

    Declaration
    public override TensorFloat Sum(TensorFloat[] tensors)
    Parameters
    Type Name Description
    TensorFloat[] tensors

    The input tensors.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Sum(TensorFloat[])

    Swish(TensorFloat)

    Computes an output tensor by applying the element-wise Swish activation function: f(x) = sigmoid(x) * x = x / (1 + e^{-x}).

    Declaration
    public override TensorFloat Swish(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Swish(TensorFloat)

    Tan(TensorFloat)

    Computes an output tensor by applying the element-wise Tan trigonometric function: f(x) = tan(x).

    Declaration
    public override TensorFloat Tan(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X
    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Tan(TensorFloat)

    Tanh(TensorFloat)

    Computes an output tensor by applying the element-wise Tanh activation function: f(x) = tanh(x).

    Declaration
    public override TensorFloat Tanh(TensorFloat X)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.Tanh(TensorFloat)

    ThresholdedRelu(TensorFloat, Single)

    Computes an output tensor by applying the element-wise ThresholdedRelu activation function: f(x) = x if x > alpha, otherwise f(x) = 0.

    Declaration
    public override TensorFloat ThresholdedRelu(TensorFloat X, float alpha)
    Parameters
    Type Name Description
    TensorFloat X
    Single alpha

    The alpha value to use for the ThresholdedRelu activation function.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    Overrides
    CPUOps.ThresholdedRelu(TensorFloat, Single)

    Transpose(Tensor, Int32[])

    Calculates an output tensor by permuting the axes and data of the input tensor according to the given permutations.

    Declaration
    public override Tensor Transpose(Tensor X, int[] permutations)
    Parameters
    Type Name Description
    Tensor X
    Int32[] permutations

    The axes to sample the output tensor from in the input tensor.

    Returns
    Type Description
    Tensor

    The computed output tensor.

    Overrides
    CPUOps.Transpose(Tensor, Int32[])
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023