Class GPUPixelOps
Represents a GPUPixel backend ops.
Inherited Members
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
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
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
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
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
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
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
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
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
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
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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
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
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
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
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
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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
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
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
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
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
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 |
| Single | beta | The beta value to use for the |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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
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
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
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
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
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
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 |
| Single | constant | The constant value to fill with when using |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
| NearestMode | nearestMode | The |
| CoordTransformMode | coordTransformMode | The |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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 |
| Single | gamma | The alpha value to use for the |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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 |
| Int32[] | steps | The step values for slicing. If this is |
Returns
| Type | Description |
|---|---|
| Tensor | The computed output tensor. |
Overrides
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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
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
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
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
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
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
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
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
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
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
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
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 |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
Overrides
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. |