Struct ONNXTensor | Barracuda | 1.0.4
docs.unity.cn
    Show / Hide Table of Contents

    Struct ONNXTensor

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Barracuda
    Syntax
    public struct ONNXTensor

    Constructors

    ONNXTensor(TensorProto)

    Declaration
    public ONNXTensor(TensorProto onnxTensor)
    Parameters
    Type Name Description
    Onnx.TensorProto onnxTensor

    ONNXTensor(Tensor, Int64[])

    Declaration
    public ONNXTensor(Tensor data, long[] onnxShape)
    Parameters
    Type Name Description
    Tensor data
    Int64[] onnxShape

    Properties

    rank

    Declaration
    public int rank { get; }
    Property Value
    Type Description
    Int32

    shape

    Declaration
    public long[] shape { get; }
    Property Value
    Type Description
    Int64[]

    Methods

    Gather(Int32, Int32[])

    Declaration
    public ONNXTensor Gather(int axis, int[] indices)
    Parameters
    Type Name Description
    Int32 axis
    Int32[] indices
    Returns
    Type Description
    ONNXTensor

    IsEmpty()

    Declaration
    public bool IsEmpty()
    Returns
    Type Description
    Boolean

    Permute(Int32[])

    Declaration
    public ONNXTensor Permute(int[] permutations)
    Parameters
    Type Name Description
    Int32[] permutations
    Returns
    Type Description
    ONNXTensor

    Reshape(Int64[])

    Declaration
    public ONNXTensor Reshape(long[] onnxShape)
    Parameters
    Type Name Description
    Int64[] onnxShape
    Returns
    Type Description
    ONNXTensor

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

    Declaration
    public ONNXTensor Slice(int[] starts, int[] ends, int[] steps)
    Parameters
    Type Name Description
    Int32[] starts
    Int32[] ends
    Int32[] steps
    Returns
    Type Description
    ONNXTensor

    Squeeze(Int32[])

    Declaration
    public ONNXTensor Squeeze(int[] axes)
    Parameters
    Type Name Description
    Int32[] axes
    Returns
    Type Description
    ONNXTensor

    SqueezeAll()

    Declaration
    public ONNXTensor SqueezeAll()
    Returns
    Type Description
    ONNXTensor

    ToBarracuda(String)

    Declaration
    public Tensor ToBarracuda(string onnxLayout)
    Parameters
    Type Name Description
    String onnxLayout
    Returns
    Type Description
    Tensor

    Unsqueeze(Int32[])

    Declaration
    public ONNXTensor Unsqueeze(int[] axes)
    Parameters
    Type Name Description
    Int32[] axes
    Returns
    Type Description
    ONNXTensor
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 20 October 2020