docs.unity3d.com
    Show / Hide Table of Contents

    Class BurstCPUOps

    Burst specific implementation of IOps

    Inheritance
    Object
    ReferenceCPUOps
    UnsafeArrayCPUOps
    BurstCPUOps
    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)
    UnsafeArrayCPUOps.Pad2DEdge(Tensor, Int32[])
    UnsafeArrayCPUOps.Pad2DReflect(Tensor, Int32[])
    UnsafeArrayCPUOps.Pad2DSymmetric(Tensor, Int32[])
    ReferenceCPUOps.PostLayerCleanup()
    ReferenceCPUOps.NewTensor(TensorShape, AllocScope, String)
    ReferenceCPUOps.NewTensorLike(Tensor, AllocScope)
    ReferenceCPUOps.NewTensorLike(Tensor[], AllocScope)
    ReferenceCPUOps.NewTensor(Int32, Int32, AllocScope, String)
    ReferenceCPUOps.NewTensor(Int32, Int32, Int32, Int32, AllocScope, String)
    ReferenceCPUOps.ResetAllocator(Boolean)
    ReferenceCPUOps.SetModelExecutionsReporter(IModelExecutionsReporter)
    ReferenceCPUOps.GetModelExecutionsReporter()
    ReferenceCPUOps.Conv3D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.FusedActivation)
    ReferenceCPUOps.Conv2DTrans(Tensor, Tensor, Tensor, Int32[], Int32[], Int32[], Layer.FusedActivation)
    ReferenceCPUOps.Upsample3D(Tensor, Int32[], Boolean)
    ReferenceCPUOps.Upsample2D(Tensor, Int32[], Boolean)
    ReferenceCPUOps.Resample2D(Tensor, Int32[], Boolean)
    ReferenceCPUOps.DepthToSpace(Tensor, Int32[], Layer.DepthToSpaceMode)
    ReferenceCPUOps.SpaceToDepth(Tensor, Int32[])
    ReferenceCPUOps.GlobalAvgVariancePool2D(Tensor)
    ReferenceCPUOps.Border3D(Tensor, Int32[], Single)
    ReferenceCPUOps.LRN(Tensor, Single, Single, Single, Int32)
    ReferenceCPUOps.Normalization(Tensor, Tensor, Tensor, Int32, Int32, Single, Layer.FusedActivation)
    ReferenceCPUOps.Bernoulli(Single)
    ReferenceCPUOps.Gaussian(Single, Single)
    ReferenceCPUOps.Dropout(Tensor, Single)
    ReferenceCPUOps.Multinomial(Tensor, Int32, Int32)
    ReferenceCPUOps.TopKIndices(Tensor, Int32, Int32, Boolean, Boolean)
    ReferenceCPUOps.NonZero(Tensor)
    ReferenceCPUOps.TopKValues(Tensor, Tensor, Int32)
    ReferenceCPUOps.ConstantOfShape(TensorShape, Single)
    ReferenceCPUOps.Shape(Tensor, Int32)
    ReferenceCPUOps.Mean(Tensor[])
    ReferenceCPUOps.ReduceMin(Tensor, Int32)
    ReferenceCPUOps.ArgMax(Tensor, Int32)
    ReferenceCPUOps.ArgMin(Tensor, Int32)
    ReferenceCPUOps.ReduceProd(Tensor, Int32)
    ReferenceCPUOps.Copy(Tensor)
    ReferenceCPUOps.Flatten(Tensor)
    ReferenceCPUOps.Reshape(Tensor, TensorShape)
    ReferenceCPUOps.Expand(Tensor, TensorShape)
    ReferenceCPUOps.NonMaxSuppression(Tensor[], Int32, Single, Single, Int32)
    ReferenceCPUOps.Transpose(Tensor)
    Namespace: Unity.Barracuda
    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, Int32[], Int32[], Int32[])

    2D average pooling

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

    pooling

    Int32[] stride

    stride

    Int32[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

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

    Border2D(Tensor, Int32[], Single)

    2D border padding

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

    padding

    Single constant
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Border2D(Tensor, Int32[], Single)

    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, Single, Single)

    Clip

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

    min value

    Single max

    max value

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Clip(Tensor, Single, Single)

    Concat(Tensor[], Int32)

    Concatenate tensors across axis

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

    input tensors

    Int32 axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Concat(Tensor[], Int32)

    Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], Layer.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
    Int32[] stride

    stride

    Int32[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Conv2D(Tensor, Tensor, Tensor, Int32[], Int32[], 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, Layer.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, Int32[], Int32[], Layer.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
    Int32[] stride

    stride

    Int32[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.DepthwiseConv2D(Tensor, Tensor, Tensor, Int32[], Int32[], 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, Single)

    ELU

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

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.Elu(Tensor, Single)

    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[], Int32)

    Gather

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

    input tensors

    Int32 axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Gather(Tensor[], Int32)

    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, Single, Single)

    HardSigmoid

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

    alpha

    Single beta
    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.HardSigmoid(Tensor, Single, Single)

    LeakyRelu(Tensor, Single)

    Leaky ReLU

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

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    UnsafeArrayCPUOps.LeakyRelu(Tensor, Single)

    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, Int32)

    LogSoftmax

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

    output Tensor

    Overrides
    ReferenceCPUOps.LogSoftmax(Tensor, Int32)

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

    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
    Tensor[] W
    Tensor[] R
    Tensor[] Wb
    Tensor[] Rb
    Tensor hidden
    Tensor cell
    Returns
    Type Description
    Tensor[]
    Overrides
    ReferenceCPUOps.LSTM(Tensor, Tensor[], Tensor[], Tensor[], Tensor[], Tensor, Tensor)

    MatMul(Tensor, Boolean, Tensor, Boolean)

    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

    Boolean xTranspose

    X transposed data flag

    Tensor Y

    right Tensor

    Boolean yTranspose

    Y transposed data flag

    Returns
    Type Description
    Tensor

    output Tensor

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

    MatMul(Tensor, Boolean, Tensor, Boolean, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

    Declaration
    public Tensor MatMul(Tensor X, bool xTranspose, Tensor Y, bool yTranspose, int? blockSizeM, int? blockSizeN, int? blockSizeK)
    Parameters
    Type Name Description
    Tensor X
    Boolean xTranspose
    Tensor Y
    Boolean yTranspose
    Nullable<Int32> blockSizeM
    Nullable<Int32> blockSizeN
    Nullable<Int32> blockSizeK
    Returns
    Type Description
    Tensor

    MatMul(Tensor, Int32, Tensor, Int32)

    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
    Int32 rankX

    rank of x

    Tensor Y
    Int32 rankY

    rank of y

    Returns
    Type Description
    Tensor

    output Tensor

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

    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, Int32[], Int32[], Int32[])

    2D max pooling

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

    pooling

    Int32[] stride

    stride

    Int32[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

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

    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, Int32, Single, Single)

    One hot

    Declaration
    public override Tensor OneHot(Tensor X, int depth, float onValue, float offValue)
    Parameters
    Type Name Description
    Tensor X
    Int32 depth

    output depth

    Single onValue

    on value

    Single offValue

    off value

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.OneHot(Tensor, Int32, Single, Single)

    Pin(Tensor, Boolean)

    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

    Boolean uploadCache

    bool

    Returns
    Type Description
    BurstTensorData

    BurstTensorData

    Pow(Tensor, Single)

    Power

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

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Pow(Tensor, Single)

    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[])

    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)

    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)

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

    RandomNormal(TensorShape, Single, Single, Int32)

    Normal random distribution

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

    shape

    Single mean

    mean

    Single scale

    scale

    Int32 seed

    seed

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.RandomNormal(TensorShape, Single, Single, Int32)

    RandomUniform(TensorShape, Single, Single, Int32)

    Uniform random distribution

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

    shape

    Single mean

    mean

    Single scale

    scale

    Int32 seed

    seed

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.RandomUniform(TensorShape, Single, Single, Int32)

    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, Int32)

    Declaration
    public override Tensor ReduceMax(Tensor X, int axis)
    Parameters
    Type Name Description
    Tensor X
    Int32 axis
    Returns
    Type Description
    Tensor
    Overrides
    ReferenceCPUOps.ReduceMax(Tensor, Int32)

    ReduceMean(Tensor, Int32)

    Reduce with mean

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

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.ReduceMean(Tensor, Int32)

    ReduceSum(Tensor, Int32)

    Reduce with sum

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

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.ReduceSum(Tensor, Int32)

    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)

    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, Single, Single)

    SELU

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

    alpha

    Single gamma

    gamma

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Selu(Tensor, Single, Single)

    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, Int32)

    Softmax

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

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Softmax(Tensor, Int32)

    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, Int32[], Int32[], Int32[])

    Strided slice

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

    stride

    Returns
    Type Description
    Tensor

    output Tensor

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

    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, Int32[])

    Tile

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

    repetition counts

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.Tile(Tensor, Int32[])

    Transpose(Tensor, Int32[])

    Transpose according to permutations

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

    new axis order

    Returns
    Type Description
    Tensor

    output Tensor

    Overrides
    ReferenceCPUOps.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