docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BurstCPUOps

    Burst specific implementation of IOps

    Inheritance
    object
    ReferenceCPUOps
    UnsafeArrayCPUOps
    BurstCPUOps
    Implements
    IOps
    IOpsStatistics
    Inherited Members
    UnsafeArrayCPUOps.Greater(Tensor, Tensor)
    UnsafeArrayCPUOps.GreaterEqual(Tensor, Tensor)
    UnsafeArrayCPUOps.Less(Tensor, Tensor)
    UnsafeArrayCPUOps.LessEqual(Tensor, Tensor)
    UnsafeArrayCPUOps.Equal(Tensor, Tensor)
    UnsafeArrayCPUOps.LogicalOr(Tensor, Tensor)
    UnsafeArrayCPUOps.LogicalAnd(Tensor, Tensor)
    UnsafeArrayCPUOps.LogicalXor(Tensor, Tensor)
    UnsafeArrayCPUOps.LogicalNot(Tensor)
    UnsafeArrayCPUOps.Sign(Tensor)
    UnsafeArrayCPUOps.Where(Tensor, Tensor, Tensor)
    UnsafeArrayCPUOps.ApplyFusedActivation(Tensor, Layer.FusedActivation)
    ReferenceCPUOps.PostLayerCleanup()
    ReferenceCPUOps.NewTensor(DataType, TensorShape, AllocScope, string)
    ReferenceCPUOps.NewTensorLike(Tensor, AllocScope)
    ReferenceCPUOps.NewTensorLike(Tensor[], AllocScope, bool)
    ReferenceCPUOps.IsFusedActivationSupported(Layer.FusedActivation)
    ReferenceCPUOps.NewTensorForFusedActivation(DataType, TensorShape, Layer.FusedActivation)
    ReferenceCPUOps.NewOutputTensor(DataType, TensorShape, string)
    ReferenceCPUOps.NewTempTensor(DataType, TensorShape, string)
    ReferenceCPUOps.ResetAllocator(bool)
    ReferenceCPUOps.SetModelExecutionsReporter(IModelExecutionsReporter)
    ReferenceCPUOps.GetModelExecutionsReporter()
    ReferenceCPUOps.Conv3D(Tensor, Tensor, Tensor, int[], int[], Layer.FusedActivation)
    ReferenceCPUOps.Conv2DTrans(Tensor, Tensor, Tensor, int[], int[], int[], Layer.FusedActivation)
    ReferenceCPUOps.Upsample3D(Tensor, int[], bool)
    ReferenceCPUOps.Upsample2D(Tensor, int[], bool)
    ReferenceCPUOps.Resample2D(Tensor, int[], bool)
    ReferenceCPUOps.DepthToSpace(Tensor, int[], Layer.DepthToSpaceMode)
    ReferenceCPUOps.SpaceToDepth(Tensor, int[])
    ReferenceCPUOps.GlobalAvgVariancePool2D(Tensor)
    ReferenceCPUOps.Border3D(Tensor, int[], float)
    ReferenceCPUOps.LRN(Tensor, float, float, float, int)
    ReferenceCPUOps.Normalization(Tensor, Tensor, Tensor, int, int, float, Layer.FusedActivation)
    ReferenceCPUOps.Bernoulli(float)
    ReferenceCPUOps.Gaussian(float, float)
    ReferenceCPUOps.Dropout(Tensor, float)
    ReferenceCPUOps.Multinomial(Tensor, int, int)
    ReferenceCPUOps.RoiAlign(Tensor, Tensor, Tensor, int, int, int, float)
    ReferenceCPUOps.TopKIndices(Tensor, int, int, bool, bool)
    ReferenceCPUOps.NonZero(Tensor)
    ReferenceCPUOps.TopKValues(Tensor, Tensor, int)
    ReferenceCPUOps.ConstantOfShape(TensorShape, DataType, float)
    ReferenceCPUOps.Shape(Tensor, int)
    ReferenceCPUOps.Mean(Tensor[])
    ReferenceCPUOps.ReduceMin(Tensor, int)
    ReferenceCPUOps.ArgMax(Tensor, int)
    ReferenceCPUOps.ArgMin(Tensor, int)
    ReferenceCPUOps.ReduceProd(Tensor, int)
    ReferenceCPUOps.Copy(Tensor)
    ReferenceCPUOps.Flatten(Tensor)
    ReferenceCPUOps.Expand(Tensor, TensorShape)
    ReferenceCPUOps.ScatterND(Tensor, Tensor, Tensor, Layer.ScatterNDReductionMode)
    ReferenceCPUOps.NonMaxSuppression(Tensor[], int, float, float, int)
    ReferenceCPUOps.Transpose(Tensor)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Barracuda
    Assembly: solution.dll
    Syntax
    public class BurstCPUOps : UnsafeArrayCPUOps, IOps, IOpsStatistics

    Constructors

    BurstCPUOps(ITensorAllocator)

    Create BurstCPUOps

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

    allocator

    Properties

    PreferBLAS

    EXPERIMENTAL: Select BLAS preference Production code should stick to default (Native) for now.

    Declaration
    public static BurstCPUOps.BLAS PreferBLAS { get; set; }
    Property Value
    Type Description
    BurstCPUOps.BLAS

    Methods

    Abs(Tensor)

    Abs

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

    output Tensor

    Overrides
    ReferenceCPUOps.Abs(Tensor)

    Acos(Tensor)

    Acos

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Acos(Tensor)

    Acosh(Tensor)

    Acosh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Acosh(Tensor)

    Add(Tensor[])

    Add tensors together

    Declaration
    public override Tensor Add(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Add(Tensor[])

    Asin(Tensor)

    Asin

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Asin(Tensor)

    Asinh(Tensor)

    Asinh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Asinh(Tensor)

    Atan(Tensor)

    Atan

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Atan(Tensor)

    Atanh(Tensor)

    Atanh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Atanh(Tensor)

    AvgPool2D(Tensor, int[], int[], int[])

    2D average pooling

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

    pooling

    int[] stride

    stride

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.AvgPool2D(Tensor, int[], int[], int[])

    Border2D(Tensor, int[], float)

    2D border padding

    Declaration
    public override Tensor Border2D(Tensor X, int[] pad, float constant)
    Parameters
    Type Name Description
    Tensor X
    int[] pad

    padding

    float constant
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Border2D(Tensor, int[], float)

    Ceil(Tensor)

    Ceil

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

    output Tensor

    Overrides
    ReferenceCPUOps.Ceil(Tensor)

    Clip(Tensor, float, float)

    Clip

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

    min value

    float max

    max value

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Clip(Tensor, float, float)

    Concat(Tensor[], int)

    Concatenate tensors across axis

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

    input tensors

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Concat(Tensor[], int)

    Conv2D(Tensor, Tensor, Tensor, int[], int[], FusedActivation)

    2D convolution

    Declaration
    public override Tensor Conv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor X
    Tensor K
    Tensor B
    int[] stride

    stride

    int[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Conv2D(Tensor, Tensor, Tensor, int[], int[], Layer.FusedActivation)

    CopyAndReshape(Tensor, TensorShape)

    Copy and reshape Tensor

    Declaration
    protected override Tensor CopyAndReshape(Tensor X, TensorShape shape)
    Parameters
    Type Name Description
    Tensor X

    input

    TensorShape shape

    shape

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.CopyAndReshape(Tensor, TensorShape)

    Cos(Tensor)

    Cos

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Cos(Tensor)

    Cosh(Tensor)

    Cosh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Cosh(Tensor)

    Dense(Tensor, Tensor, Tensor, FusedActivation)

    Dense layer (matrix multiplication) o = x ⨯ w + b

    Declaration
    public override Tensor Dense(Tensor X, Tensor W, Tensor B, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor X
    Tensor W
    Tensor B
    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Dense(Tensor, Tensor, Tensor, Layer.FusedActivation)

    Dense3(Tensor, Tensor, Tensor)

    rank3 Dense layer (matrix multiplication) o = x ⨯ w + b O: N,,W,C / X: N,,W,C / W:N,,,C / B:N,,,_

    Declaration
    public override Tensor Dense3(Tensor X, Tensor W, Tensor B)
    Parameters
    Type Name Description
    Tensor X
    Tensor W
    Tensor B
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Dense3(Tensor, Tensor, Tensor)

    DepthwiseConv2D(Tensor, Tensor, Tensor, int[], int[], FusedActivation)

    Depthwise 2D convolution

    Declaration
    public override Tensor DepthwiseConv2D(Tensor X, Tensor K, Tensor B, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor X
    Tensor K
    Tensor B
    int[] stride

    stride

    int[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.DepthwiseConv2D(Tensor, Tensor, Tensor, int[], int[], Layer.FusedActivation)

    Div(Tensor[])

    Divide tensors o = tensors[0] / tensors[1] / ... / tensors[N-1]

    Declaration
    public override Tensor Div(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Div(Tensor[])

    Elu(Tensor, float)

    ELU

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

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Elu(Tensor, float)

    Erf(Tensor)

    Erf

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Erf(Tensor)

    Exp(Tensor)

    Exponent e^x

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Exp(Tensor)

    Floor(Tensor)

    Floor

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

    output Tensor

    Overrides
    ReferenceCPUOps.Floor(Tensor)

    Gather(Tensor[], int)

    Gather

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

    input tensors

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Gather(Tensor[], int)

    GlobalAvgPool2D(Tensor)

    2D global average pooling

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.GlobalAvgPool2D(Tensor)

    GlobalMaxPool2D(Tensor)

    2D global max pooling

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.GlobalMaxPool2D(Tensor)

    HardSigmoid(Tensor, float, float)

    HardSigmoid

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

    alpha

    float beta
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.HardSigmoid(Tensor, float, float)

    LSTM(Tensor, Tensor[], Tensor[], Tensor[], Tensor[], Tensor, Tensor)

    LSTM

    Declaration
    public override Tensor[] LSTM(Tensor X, Tensor[] W, Tensor[] R, Tensor[] Wb, Tensor[] Rb, Tensor hidden, Tensor cell)
    Parameters
    Type Name Description
    Tensor X

    The input sequences packed into one 3-D tensor.

    Tensor[] W

    W parameter weight matrix for input, output, forget, and cell gates - W[iofc]

    Tensor[] R

    R recurrence weight matrix for input, output, forget, and cell gates - R[iofc]

    Tensor[] Wb

    W bias vectors for input, output, forget, and cell gates - Wb[iofc]

    Tensor[] Rb

    R bias vectors for input, output, forget, and cell gates - Rb[iofc]

    Tensor hidden

    Initial value of the hidden

    Tensor cell

    Initial value of the cell

    Returns
    Type Description
    Tensor[]

    [Y (concatenated intermediate values of the hidden), Y_h (final hidden), Y_c (final cell)]

    Overrides
    ReferenceCPUOps.LSTM(Tensor, Tensor[], Tensor[], Tensor[], Tensor[], Tensor, Tensor)

    LeakyRelu(Tensor, float)

    Leaky ReLU

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

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.LeakyRelu(Tensor, float)

    Log(Tensor)

    Log

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

    output Tensor

    Overrides
    ReferenceCPUOps.Log(Tensor)

    LogSoftmax(Tensor, int)

    LogSoftmax

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

    output Tensor

    Overrides
    ReferenceCPUOps.LogSoftmax(Tensor, int)

    MatMul(Tensor, bool, Tensor, bool)

    Simple 2D matrix multiplication O = X ⨯ Y

    Declaration
    public override Tensor MatMul(Tensor X, bool xTranspose, Tensor Y, bool yTranspose)
    Parameters
    Type Name Description
    Tensor X

    left Tensor

    bool xTranspose

    X transposed data flag

    Tensor Y

    right Tensor

    bool yTranspose

    Y transposed data flag

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.MatMul(Tensor, bool, Tensor, bool)

    MatMul(Tensor, int, Tensor, int)

    Multidimensional Matrix multiplication o = x ⨯ y

    Declaration
    public override Tensor MatMul(Tensor X, int rankX, Tensor Y, int rankY)
    Parameters
    Type Name Description
    Tensor X
    int rankX

    rank of x

    Tensor Y
    int rankY

    rank of y

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.MatMul(Tensor, int, Tensor, int)

    Max(Tensor[])

    Max

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Max(Tensor[])

    MaxPool2D(Tensor, int[], int[], int[])

    2D max pooling

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

    pooling

    int[] stride

    stride

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.MaxPool2D(Tensor, int[], int[], int[])

    Min(Tensor[])

    Min

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Min(Tensor[])

    Mul(Tensor[])

    Multiply tensors together

    Declaration
    public override Tensor Mul(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Mul(Tensor[])

    Neg(Tensor)

    Neg

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Neg(Tensor)

    OneHot(Tensor, int, float, float, int)

    One hot

    Declaration
    public override Tensor OneHot(Tensor X, int depth, float onValue, float offValue, int inputRank = -1)
    Parameters
    Type Name Description
    Tensor X
    int depth

    output depth

    float onValue

    on value

    float offValue

    off value

    int inputRank

    input rank helper

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.OneHot(Tensor, int, float, float, int)

    PRelu(Tensor, Tensor)

    PReLU

    Declaration
    public override Tensor PRelu(Tensor X, Tensor S)
    Parameters
    Type Name Description
    Tensor X
    Tensor S
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.PRelu(Tensor, Tensor)

    Pad2DEdge(Tensor, int[])

    Edge padding

    Declaration
    public override Tensor Pad2DEdge(Tensor X, int[] pad)
    Parameters
    Type Name Description
    Tensor X
    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pad2DEdge(Tensor, int[])

    Pad2DReflect(Tensor, int[])

    Reflection padding

    Declaration
    public override Tensor Pad2DReflect(Tensor X, int[] pad)
    Parameters
    Type Name Description
    Tensor X
    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pad2DReflect(Tensor, int[])

    Pad2DSymmetric(Tensor, int[])

    Symmetric padding

    Declaration
    public override Tensor Pad2DSymmetric(Tensor X, int[] pad)
    Parameters
    Type Name Description
    Tensor X
    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pad2DSymmetric(Tensor, int[])

    Pin(Tensor, bool)

    Pin Tensor to Burst backend device, if uploadCache is false, data is not uploaded to device

    Declaration
    public static BurstTensorData Pin(Tensor X, bool uploadCache = true)
    Parameters
    Type Name Description
    Tensor X

    Tensor

    bool uploadCache

    bool

    Returns
    Type Description
    BurstTensorData

    BurstTensorData

    Pow(Tensor, float)

    Power

    Declaration
    public override Tensor Pow(Tensor X, float alpha)
    Parameters
    Type Name Description
    Tensor X
    float alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pow(Tensor, float)

    Pow(Tensor[])

    Raise tensors to the power o =tensors[0] ^ tensors[1] ^ ... ^ tensors[N-1]

    Declaration
    public override Tensor Pow(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pow(Tensor[])

    Prepare(Tensor)

    Prepare Tensor for use with Burst backend

    Declaration
    public override Tensor Prepare(Tensor X)
    Parameters
    Type Name Description
    Tensor X

    Tensor

    Returns
    Type Description
    Tensor

    Tensor

    Overrides
    UnsafeArrayCPUOps.Prepare(Tensor)

    PrepareNoAlloc(Tensor)

    Prepares tensor for use without uploading internal data to device

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

    Tensor

    Overrides
    UnsafeArrayCPUOps.PrepareNoAlloc(Tensor)

    RandomNormal(TensorShape, float, float, int)

    Normal random distribution

    Declaration
    public override Tensor RandomNormal(TensorShape s, float mean, float scale, int seed)
    Parameters
    Type Name Description
    TensorShape s

    shape

    float mean

    mean

    float scale

    scale

    int seed

    seed

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.RandomNormal(TensorShape, float, float, int)

    RandomUniform(TensorShape, float, float, int)

    Uniform random distribution

    Declaration
    public override Tensor RandomUniform(TensorShape s, float mean, float scale, int seed)
    Parameters
    Type Name Description
    TensorShape s

    shape

    float mean

    mean

    float scale

    scale

    int seed

    seed

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.RandomUniform(TensorShape, float, float, int)

    Reciprocal(Tensor)

    Reciprocal (1/x)

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

    output Tensor

    Overrides
    ReferenceCPUOps.Reciprocal(Tensor)

    ReduceMax(Tensor, int)

    Reduce with max

    Declaration
    public override Tensor ReduceMax(Tensor X, int axis)
    Parameters
    Type Name Description
    Tensor X
    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.ReduceMax(Tensor, int)

    ReduceMean(Tensor, int)

    Reduce with mean

    Declaration
    public override Tensor ReduceMean(Tensor X, int axis)
    Parameters
    Type Name Description
    Tensor X
    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.ReduceMean(Tensor, int)

    ReduceSum(Tensor, int)

    Reduce with sum

    Declaration
    public override Tensor ReduceSum(Tensor X, int axis)
    Parameters
    Type Name Description
    Tensor X
    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.ReduceSum(Tensor, int)

    Relu(Tensor)

    ReLU

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Relu(Tensor)

    Relu6(Tensor)

    ReLU capped to 6

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Relu6(Tensor)

    Reshape(Tensor, TensorShape)

    Reshape

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

    output Tensor

    Overrides
    ReferenceCPUOps.Reshape(Tensor, TensorShape)

    Round(Tensor)

    Round to nearest integer. In case of halfs, round to nearest even integer

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

    output Tensor

    Overrides
    ReferenceCPUOps.Round(Tensor)

    ScaleBias(Tensor, Tensor, Tensor)

    Scale bias o = s * x + b, element wise

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.ScaleBias(Tensor, Tensor, Tensor)

    Selu(Tensor, float, float)

    SELU

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

    alpha

    float gamma

    gamma

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Selu(Tensor, float, float)

    Sigmoid(Tensor)

    Sigmoid

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Sigmoid(Tensor)

    Sin(Tensor)

    Sin

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Sin(Tensor)

    Sinh(Tensor)

    Sinh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Sinh(Tensor)

    Softmax(Tensor, int)

    Softmax

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

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Softmax(Tensor, int)

    Softplus(Tensor)

    Softplus

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Softplus(Tensor)

    Sqrt(Tensor)

    Sqrt

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Sqrt(Tensor)

    StridedSlice(Tensor, int[], int[], int[])

    Strided slice

    Declaration
    public override Tensor StridedSlice(Tensor X, int[] starts4Dor8D, int[] ends4Dor8D, int[] strides4Dor8D)
    Parameters
    Type Name Description
    Tensor X
    int[] starts4Dor8D
    int[] ends4Dor8D
    int[] strides4Dor8D

    stride

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.StridedSlice(Tensor, int[], int[], int[])

    Sub(Tensor[])

    Subtract tensors o = tensors[0] - tensors[1] - ... - tensors[N-1]

    Declaration
    public override Tensor Sub(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Sub(Tensor[])

    Swish(Tensor)

    Swish

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Swish(Tensor)

    Tan(Tensor)

    Tan

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Tan(Tensor)

    Tanh(Tensor)

    Tanh

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

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Tanh(Tensor)

    Tile(Tensor, int[])

    Tile

    Declaration
    public override Tensor Tile(Tensor X, int[] repeats)
    Parameters
    Type Name Description
    Tensor X
    int[] repeats

    repetition counts

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Tile(Tensor, int[])

    Transpose(Tensor, int[])

    Transpose according to permutations

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

    new axis order

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Transpose(Tensor, int[])

    Implements

    IOps
    IOpsStatistics
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)