docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IOps

    Interfaces for backend implementers see ModelBuilder.cs for detail on layers.

    Namespace: Unity.Barracuda
    Assembly: Unity.Barracuda.dll
    Syntax
    public interface IOps

    Methods

    Abs(Tensor)

    Abs

    Declaration
    Tensor Abs(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Acos(Tensor)

    Acos

    Declaration
    Tensor Acos(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Acosh(Tensor)

    Acosh

    Declaration
    Tensor Acosh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Add(Tensor[])

    Add tensors together

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    ArgMax(Tensor, int)

    ArgMax

    Declaration
    Tensor ArgMax(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ArgMin(Tensor, int)

    ArgMax

    Declaration
    Tensor ArgMin(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Asin(Tensor)

    Asin

    Declaration
    Tensor Asin(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Asinh(Tensor)

    Asinh

    Declaration
    Tensor Asinh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Atan(Tensor)

    Atan

    Declaration
    Tensor Atan(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Atanh(Tensor)

    Atanh

    Declaration
    Tensor Atanh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

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

    2D average pooling

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

    input

    int[] pool

    pooling

    int[] stride

    stride

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Border2D(Tensor, int[], float)

    2D border padding

    Declaration
    Tensor Border2D(Tensor x, int[] pad, float borderValue)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] pad

    padding

    float borderValue

    border value

    Returns
    Type Description
    Tensor

    output Tensor

    Border3D(Tensor, int[], float)

    3D border padding

    Declaration
    Tensor Border3D(Tensor x, int[] pad, float borderValue)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] pad

    padding

    float borderValue

    border value

    Returns
    Type Description
    Tensor

    output Tensor

    Ceil(Tensor)

    Ceil

    Declaration
    Tensor Ceil(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Clip(Tensor, float, float)

    Clip

    Declaration
    Tensor Clip(Tensor x, float min, float max)
    Parameters
    Type Name Description
    Tensor x

    input

    float min

    min value

    float max

    max value

    Returns
    Type Description
    Tensor

    output Tensor

    Concat(Tensor[], int)

    Concatenate tensors across axis

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

    input tensors

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ConstantOfShape(TensorShape, float)

    Creates a constant of shape input

    Declaration
    Tensor ConstantOfShape(TensorShape X, float value = 0)
    Parameters
    Type Name Description
    TensorShape X

    input shape

    float value

    value

    Returns
    Type Description
    Tensor

    output Tensor

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

    2D convolution

    Declaration
    Tensor Conv2D(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor k

    kernel

    Tensor b

    bias

    int[] stride

    stride

    int[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

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

    Transpose 2D convolution

    Declaration
    Tensor Conv2DTrans(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, int[] outputAdjustment, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor k

    kernel

    Tensor b

    bias

    int[] stride

    stride

    int[] pad

    padding

    int[] outputAdjustment

    output adjustments

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

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

    3D convolution

    Declaration
    Tensor Conv3D(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor k

    kernel

    Tensor b

    bias

    int[] stride

    stride

    int[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Copy(Tensor)

    Copy

    Declaration
    Tensor Copy(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Cos(Tensor)

    Cos

    Declaration
    Tensor Cos(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Cosh(Tensor)

    Cosh

    Declaration
    Tensor Cosh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Dense(Tensor, Tensor, Tensor, FusedActivation)

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

    Declaration
    Tensor Dense(Tensor x, Tensor w, Tensor b, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    x argument

    Tensor w

    w argument

    Tensor b

    bias argument

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    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
    Tensor Dense3(Tensor x, Tensor w, Tensor b)
    Parameters
    Type Name Description
    Tensor x

    x argument (rank3)

    Tensor w

    w argument (rank2)

    Tensor b

    bias argument (rank1)

    Returns
    Type Description
    Tensor

    output Tensor

    DepthToSpace(Tensor, int[], DepthToSpaceMode)

    Depth to space

    Declaration
    Tensor DepthToSpace(Tensor x, int[] scale, Layer.DepthToSpaceMode mode)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] scale

    scale

    Layer.DepthToSpaceMode mode

    mode

    Returns
    Type Description
    Tensor

    output Tensor

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

    Depthwise 2D convolution

    Declaration
    Tensor DepthwiseConv2D(Tensor x, Tensor k, Tensor b, int[] stride, int[] pad, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor k

    kernel

    Tensor b

    bias

    int[] stride

    stride

    int[] pad

    padding

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    Div(Tensor[])

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

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Dropout(Tensor, float)

    Dropout

    Declaration
    Tensor Dropout(Tensor x, float alpha)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Elu(Tensor, float)

    ELU

    Declaration
    Tensor Elu(Tensor x, float alpha)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Equal(Tensor, Tensor)

    Equal

    Declaration
    Tensor Equal(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a == b

    Exp(Tensor)

    Exponent e^x

    Declaration
    Tensor Exp(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Expand(Tensor, TensorShape)

    Expand

    Declaration
    Tensor Expand(Tensor x, TensorShape shape)
    Parameters
    Type Name Description
    Tensor x

    input

    TensorShape shape

    new shape

    Returns
    Type Description
    Tensor

    output Tensor

    Flatten(Tensor)

    Flatten

    Declaration
    Tensor Flatten(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Floor(Tensor)

    Floor

    Declaration
    Tensor Floor(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Gather(Tensor[], int)

    Gather

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

    input tensors

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    GlobalAvgPool2D(Tensor)

    2D global average pooling

    Declaration
    Tensor GlobalAvgPool2D(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    GlobalAvgVariancePool2D(Tensor)

    2D global average variance pooling

    Declaration
    Tensor GlobalAvgVariancePool2D(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    GlobalMaxPool2D(Tensor)

    2D global max pooling

    Declaration
    Tensor GlobalMaxPool2D(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Greater(Tensor, Tensor)

    Greater

    Declaration
    Tensor Greater(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a > b

    GreaterEqual(Tensor, Tensor)

    Greater or equal

    Declaration
    Tensor GreaterEqual(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a >= b

    LRN(Tensor, float, float, float, int)

    LRN (Local Response Normalization)

    Declaration
    Tensor LRN(Tensor x, float alpha, float beta, float bias, int size)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    float beta

    beta

    float bias

    bias

    int size

    size

    Returns
    Type Description
    Tensor

    output Tensor

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

    LSTM

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

    LeakyRelu(Tensor, float)

    Leaky ReLU

    Declaration
    Tensor LeakyRelu(Tensor x, float alpha)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Less(Tensor, Tensor)

    Less

    Declaration
    Tensor Less(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a < b

    LessEqual(Tensor, Tensor)

    Less or equal

    Declaration
    Tensor LessEqual(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a < b

    Log(Tensor)

    Log

    Declaration
    Tensor Log(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    LogSoftmax(Tensor)

    LogSoftmax

    Declaration
    Tensor LogSoftmax(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    LogicalAnd(Tensor, Tensor)

    And

    Declaration
    Tensor LogicalAnd(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a && b

    LogicalNot(Tensor)

    Not

    Declaration
    Tensor LogicalNot(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    Tensor with !x values

    LogicalOr(Tensor, Tensor)

    Or

    Declaration
    Tensor LogicalOr(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a || b

    LogicalXor(Tensor, Tensor)

    Xor

    Declaration
    Tensor LogicalXor(Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor a

    left Tensor

    Tensor b

    right Tensor

    Returns
    Type Description
    Tensor

    Tensor with true where a xor b

    MatMul(Tensor, bool, Tensor, bool)

    Matrix multiplication o = x ⨯ y

    Declaration
    Tensor MatMul(Tensor x, bool xTranspose, Tensor y, bool yTranspose)
    Parameters
    Type Name Description
    Tensor x

    left Tensor

    bool xTranspose

    transposed x flag

    Tensor y

    right Tensor

    bool yTranspose

    transposed y flag

    Returns
    Type Description
    Tensor

    output Tensor

    MatMul(Tensor, int, Tensor, int)

    Multidimensional Matrix multiplication o = x ⨯ y

    Declaration
    Tensor MatMul(Tensor x, int rankX, Tensor y, int rankY)
    Parameters
    Type Name Description
    Tensor x

    left Tensor

    int rankX

    rank of x

    Tensor y

    right Tensor

    int rankY

    rank of y

    Returns
    Type Description
    Tensor

    output Tensor

    Max(Tensor[])

    Max

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

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

    2D max pooling

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

    input

    int[] pool

    pooling

    int[] stride

    stride

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Mean(Tensor[])

    Mean

    Declaration
    Tensor Mean(Tensor[] tensors)
    Parameters
    Type Name Description
    Tensor[] tensors

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Min(Tensor[])

    Min

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Mul(Tensor[])

    Multiply tensors together

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Multinomial(Tensor, int, int)

    Multinomial random distribution

    Declaration
    Tensor Multinomial(Tensor x, int count, int seed)
    Parameters
    Type Name Description
    Tensor x

    input

    int count

    count

    int seed

    seed

    Returns
    Type Description
    Tensor

    output Tensor

    Neg(Tensor)

    Neg

    Declaration
    Tensor Neg(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    NonMaxSuppression(Tensor[], int, float, float, int)

    Non max suppression tensors[0] - boxes, tensors[1] - scores

    Declaration
    Tensor NonMaxSuppression(Tensor[] tensors, int maxOutputBoxesPerClass, float iouThreshold, float scoreThreshold, int centerPointBox)
    Parameters
    Type Name Description
    Tensor[] tensors
    int maxOutputBoxesPerClass

    max output boxes per class

    float iouThreshold

    IOU (Intersection Over Union) threshold

    float scoreThreshold

    score threshold

    int centerPointBox

    center point box

    Returns
    Type Description
    Tensor

    output Tensor

    NonZero(Tensor)

    Indices for non zero values

    Declaration
    Tensor NonZero(Tensor X)
    Parameters
    Type Name Description
    Tensor X

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Normalization(Tensor, Tensor, Tensor, int, int, float, FusedActivation)

    Normalization

    Declaration
    Tensor Normalization(Tensor x, Tensor s, Tensor b, int pool, int axis, float epsilon, Layer.FusedActivation fusedActivation)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor s

    scale

    Tensor b

    bias

    int pool

    pooling

    int axis

    axis

    float epsilon

    threshold

    Layer.FusedActivation fusedActivation

    fused activation type

    Returns
    Type Description
    Tensor

    output Tensor

    OneHot(Tensor, int, float, float)

    One hot

    Declaration
    Tensor OneHot(Tensor x, int depth, float onValue, float offValue)
    Parameters
    Type Name Description
    Tensor x

    input

    int depth

    output depth

    float onValue

    on value

    float offValue

    off value

    Returns
    Type Description
    Tensor

    output Tensor

    PRelu(Tensor, Tensor)

    PReLU

    Declaration
    Tensor PRelu(Tensor x, Tensor alpha)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Pad2DEdge(Tensor, int[])

    Edge padding

    Declaration
    Tensor Pad2DEdge(Tensor x, int[] pad)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Pad2DReflect(Tensor, int[])

    Reflection padding

    Declaration
    Tensor Pad2DReflect(Tensor x, int[] pad)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Pad2DSymmetric(Tensor, int[])

    Symmetric padding

    Declaration
    Tensor Pad2DSymmetric(Tensor x, int[] pad)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] pad

    padding

    Returns
    Type Description
    Tensor

    output Tensor

    Pow(Tensor, float)

    Power

    Declaration
    Tensor Pow(Tensor x, float alpha)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    Returns
    Type Description
    Tensor

    output Tensor

    Pow(Tensor[])

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

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Prepare(Tensor)

    Prepares tensor for use

    Declaration
    Tensor Prepare(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    Tensor

    RandomNormal(TensorShape, float, float, int)

    Normal random distribution

    Declaration
    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

    RandomUniform(TensorShape, float, float, int)

    Uniform random distribution

    Declaration
    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

    Reciprocal(Tensor)

    Reciprocal (1/x)

    Declaration
    Tensor Reciprocal(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    ReduceMax(Tensor, int)

    Reduce with max

    Declaration
    Tensor ReduceMax(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ReduceMean(Tensor, int)

    Reduce with mean

    Declaration
    Tensor ReduceMean(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ReduceMin(Tensor, int)

    Reduce with min

    Declaration
    Tensor ReduceMin(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ReduceProd(Tensor, int)

    Reduce with product

    Declaration
    Tensor ReduceProd(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    ReduceSum(Tensor, int)

    Reduce with sum

    Declaration
    Tensor ReduceSum(Tensor x, int axis)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Relu(Tensor)

    ReLU

    Declaration
    Tensor Relu(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Relu6(Tensor)

    ReLU capped to 6

    Declaration
    Tensor Relu6(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Resample2D(Tensor, int[], bool)

    Resample 2D

    Declaration
    Tensor Resample2D(Tensor x, int[] size, bool bilinear)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] size

    size

    bool bilinear

    bilinear flag

    Returns
    Type Description
    Tensor

    output Tensor

    ResetAllocator(bool)

    Reset internal allocator

    Declaration
    void ResetAllocator(bool keepCachedMemory = true)
    Parameters
    Type Name Description
    bool keepCachedMemory

    keep cached memory flag

    Reshape(Tensor, TensorShape)

    Reshape

    Declaration
    Tensor Reshape(Tensor x, TensorShape shape)
    Parameters
    Type Name Description
    Tensor x

    input

    TensorShape shape

    new shape

    Returns
    Type Description
    Tensor

    output Tensor

    Round(Tensor)

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

    Declaration
    Tensor Round(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    ScaleBias(Tensor, Tensor, Tensor)

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

    Declaration
    Tensor ScaleBias(Tensor x, Tensor s, Tensor b)
    Parameters
    Type Name Description
    Tensor x

    input

    Tensor s

    scale

    Tensor b

    bias

    Returns
    Type Description
    Tensor

    output Tensor

    Selu(Tensor, float, float)

    SELU

    Declaration
    Tensor Selu(Tensor x, float alpha, float gamma)
    Parameters
    Type Name Description
    Tensor x

    input

    float alpha

    alpha

    float gamma

    gamma

    Returns
    Type Description
    Tensor

    output Tensor

    Shape(Tensor, int)

    Shape of the input

    Declaration
    Tensor Shape(Tensor X, int axis = -1)
    Parameters
    Type Name Description
    Tensor X

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Sigmoid(Tensor)

    Sigmoid

    Declaration
    Tensor Sigmoid(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Sign(Tensor)

    Sign

    Declaration
    Tensor Sign(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    Tensor with 1 if x > 0 -1 if < 0 and 0 if == 0 values

    Sin(Tensor)

    Sin

    Declaration
    Tensor Sin(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Sinh(Tensor)

    Sinh

    Declaration
    Tensor Sinh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Softmax(Tensor, int)

    Softmax

    Declaration
    Tensor Softmax(Tensor x, int axis = 1)
    Parameters
    Type Name Description
    Tensor x

    input

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Softplus(Tensor)

    Softplus

    Declaration
    Tensor Softplus(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    SpaceToDepth(Tensor, int[])

    Space to depth

    Declaration
    Tensor SpaceToDepth(Tensor x, int[] scale)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] scale

    scale

    Returns
    Type Description
    Tensor

    output Tensor

    Sqrt(Tensor)

    Sqrt

    Declaration
    Tensor Sqrt(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

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

    Strided slice

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

    input

    int[] starts4Dor8D
    int[] ends4Dor8D
    int[] strides4Dor8D

    stride

    Returns
    Type Description
    Tensor

    output Tensor

    Sub(Tensor[])

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

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

    input tensors

    Returns
    Type Description
    Tensor

    output Tensor

    Swish(Tensor)

    Swish

    Declaration
    Tensor Swish(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Tan(Tensor)

    Tan

    Declaration
    Tensor Tan(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Tanh(Tensor)

    Tanh

    Declaration
    Tensor Tanh(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Tile(Tensor, int[])

    Tile

    Declaration
    Tensor Tile(Tensor x, int[] repeats)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] repeats

    repetition counts

    Returns
    Type Description
    Tensor

    output Tensor

    TopKIndices(Tensor, int, int, bool, bool)

    Top K indices

    Declaration
    Tensor TopKIndices(Tensor x, int k, int axis, bool largest, bool sorted)
    Parameters
    Type Name Description
    Tensor x

    input

    int k

    k

    int axis

    axis

    bool largest

    largest flag

    bool sorted

    sorted flag

    Returns
    Type Description
    Tensor

    output Tensor

    TopKValues(Tensor, Tensor, int)

    Top K values

    Declaration
    Tensor TopKValues(Tensor X, Tensor I, int axis)
    Parameters
    Type Name Description
    Tensor X

    input

    Tensor I

    indices

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Transpose(Tensor)

    Transpose matrix

    Declaration
    Tensor Transpose(Tensor x)
    Parameters
    Type Name Description
    Tensor x

    input

    Returns
    Type Description
    Tensor

    output Tensor

    Transpose(Tensor, int[])

    Transpose according to permutations

    Declaration
    Tensor Transpose(Tensor x, int[] permutations)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] permutations

    new axis order

    Returns
    Type Description
    Tensor

    output Tensor

    Upsample2D(Tensor, int[], bool)

    Upsample 2D

    Declaration
    Tensor Upsample2D(Tensor x, int[] scale, bool bilinear)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] scale

    scale

    bool bilinear

    bilinear flag

    Returns
    Type Description
    Tensor

    output Tensor

    Upsample3D(Tensor, int[], bool)

    Upsample 3D

    Declaration
    Tensor Upsample3D(Tensor x, int[] scale, bool trilinear)
    Parameters
    Type Name Description
    Tensor x

    input

    int[] scale

    scale

    bool trilinear

    trilinear flag

    Returns
    Type Description
    Tensor

    output Tensor

    Where(Tensor, Tensor, Tensor)

    Where

    Declaration
    Tensor Where(Tensor c, Tensor a, Tensor b)
    Parameters
    Type Name Description
    Tensor c

    Tensor c

    Tensor a

    Tensor a

    Tensor b

    Tensor b

    Returns
    Type Description
    Tensor

    Tensor with values c ? a : b

    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)