docs.unity3d.com
    Show / Hide Table of Contents

    Class TestSet

    Test set loading utility

    Inheritance
    Object
    TestSet
    Namespace: Unity.Barracuda
    Syntax
    public class TestSet : object

    Constructors

    TestSet()

    Create TestSet

    Declaration
    public TestSet()

    TestSet(JSONTestSet)

    Create with JSON test set

    Declaration
    public TestSet(JSONTestSet jsonTestSet)
    Parameters
    Type Name Description
    JSONTestSet jsonTestSet

    JSON test set

    TestSet(RawTestSet)

    Create with raw test set

    Declaration
    public TestSet(RawTestSet rawTestSet)
    Parameters
    Type Name Description
    RawTestSet rawTestSet

    raw test set

    Methods

    GetInputAsTensor(Int32, Int32, Int32)

    Get input as Tensor

    Declaration
    public Tensor GetInputAsTensor(int idx = 0, int batchCount = null, int fromBatch = 0)
    Parameters
    Type Name Description
    Int32 idx

    input index

    Int32 batchCount

    max batch count

    Int32 fromBatch

    start from batch

    Returns
    Type Description
    Tensor

    Tensor

    GetInputCount()

    Get input tensor count

    Declaration
    public int GetInputCount()
    Returns
    Type Description
    Int32

    GetInputData(Int32)

    Get input tensor data

    Declaration
    public float[] GetInputData(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    input tensor index

    Returns
    Type Description
    Single[]

    tensor data

    GetInputName(Int32)

    Get input tensor name

    Declaration
    public string GetInputName(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    input tensor index

    Returns
    Type Description
    String

    tensor name

    GetInputsAsTensorDictionary(Dictionary<String, Tensor>, Int32, Int32)

    Get inputs as Tensor dictionary

    Declaration
    public Dictionary<string, Tensor> GetInputsAsTensorDictionary(Dictionary<string, Tensor> inputs = null, int batchCount = null, int fromBatch = 0)
    Parameters
    Type Name Description
    Dictionary<String, Tensor> inputs

    dictionary to store results

    Int32 batchCount

    max batch count

    Int32 fromBatch

    start from batch

    Returns
    Type Description
    Dictionary<String, Tensor>

    dictionary with input tensors

    GetInputShape(Int32)

    Get input shape

    Declaration
    public TensorShape GetInputShape(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    input tensor index

    Returns
    Type Description
    TensorShape

    input shape

    GetOutputAsTensor(Int32, Int32, Int32)

    Get output as Tensor

    Declaration
    public Tensor GetOutputAsTensor(int idx = 0, int batchCount = null, int fromBatch = 0)
    Parameters
    Type Name Description
    Int32 idx

    output index

    Int32 batchCount

    max batch count

    Int32 fromBatch

    start from batch

    Returns
    Type Description
    Tensor

    Tensor

    GetOutputCount()

    Get output tensor count

    Declaration
    public int GetOutputCount()
    Returns
    Type Description
    Int32

    GetOutputData(Int32)

    Get output tensor data

    Declaration
    public float[] GetOutputData(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    tensor index

    Returns
    Type Description
    Single[]

    tensor data

    GetOutputName(Int32)

    Get output tensor name

    Declaration
    public string GetOutputName(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    tensor index

    Returns
    Type Description
    String

    tensor name

    GetOutputsAsTensorDictionary(Dictionary<String, Tensor>, Int32, Int32)

    Get outputs as Tensor dictionary

    Declaration
    public Dictionary<string, Tensor> GetOutputsAsTensorDictionary(Dictionary<string, Tensor> outputs = null, int batchCount = null, int fromBatch = 0)
    Parameters
    Type Name Description
    Dictionary<String, Tensor> outputs

    dictionary to store results

    Int32 batchCount

    max batch count

    Int32 fromBatch

    start from batch

    Returns
    Type Description
    Dictionary<String, Tensor>

    dictionary with input tensors

    GetOutputShape(Int32)

    Get output tensor shape

    Declaration
    public TensorShape GetOutputShape(int idx = 0)
    Parameters
    Type Name Description
    Int32 idx

    output tensor index

    Returns
    Type Description
    TensorShape

    tensor shape

    SupportsNames()

    Check if test set supports named tensors

    Declaration
    public bool SupportsNames()
    Returns
    Type Description
    Boolean

    true if named tensors are supported

    Extension Methods

    DeprecatedTestSetExtensions.GetInputShape(TestSet, Int32)
    DeprecatedTestSetExtensions.GetOutputShape(TestSet, 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