Show / Hide Table of Contents

    Class TensorsInfo

    Definition

    Namespace:
    Tizen.MachineLearning.Inference
    Assembly:
    Tizen.MachineLearning.Inference.dll
    API Level:
    6

    The TensorsInfo class manages each Tensor information such as Name, Type and Dimension.

    public class TensorsInfo : IDisposable
    Inheritance
    Object
    TensorsInfo
    Implements
    IDisposable

    Constructors

    View Source

    TensorsInfo()

    Creates a TensorsInfo instance.

    Declaration
    public TensorsInfo()
    Exceptions
    Type Condition
    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference

    Properties

    View Source

    Count

    Get the number of Tensor information which is added.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32
    API Level: 6

    Methods

    View Source

    AddTensorInfo(String, TensorType, Int32[])

    Add a Tensor information to the TensorsInfo instance. Note that we support up to 16 tensors in TensorsInfo.

    Declaration
    public void AddTensorInfo(string name, TensorType type, int[] dimension)
    Parameters
    Type Name Description
    String name

    Name of Tensor.

    TensorType type

    Data element type of Tensor.

    Int32[] dimension

    Dimension of Tensor. Note that we support up to 4th ranks.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the number of Tensor already exceeds the size limits (i.e. Tensor.SlzeLimit)

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference
    View Source

    AddTensorInfo(TensorType, Int32[])

    Add a Tensor information to the TensorsInfo instance. Note that we support up to 16 tensors in TensorsInfo.

    Declaration
    public void AddTensorInfo(TensorType type, int[] dimension)
    Parameters
    Type Name Description
    TensorType type

    Data element type of Tensor.

    Int32[] dimension

    Dimension of Tensor. Note that we support up to 4th ranks.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the number of Tensor already exceeds the size limits (i.e. Tensor.SlzeLimit)

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference
    View Source

    Dispose()

    Releases any unmanaged resources used by this object.

    Declaration
    public void Dispose()
    API Level: 6
    View Source

    Dispose(Boolean)

    Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    If true, disposes any disposable objects. If false, does not dispose disposable objects.

    View Source

    Finalize()

    Destroys the TensorsInfo resource.

    Declaration
    protected void Finalize()
    API Level: 6
    View Source

    GetDimension(Int32)

    Gets the tensor dimension with given index.

    Declaration
    public int[] GetDimension(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor.

    Returns
    Type Description
    Int32[]

    The tensor dimension.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    View Source

    GetTensorName(Int32)

    Gets the tensor name with given index.

    Declaration
    public string GetTensorName(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor.

    Returns
    Type Description
    String

    The tensor name.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    View Source

    GetTensorsData()

    Creates a TensorsData instance based on informations of TensorsInfo

    Declaration
    public TensorsData GetTensorsData()
    Returns
    Type Description
    TensorsData

    TensorsData instance

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the method failed due to TensorsInfo's information is invalid.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference
    View Source

    GetTensorType(Int32)

    Gets the tensor type with given index.

    Declaration
    public TensorType GetTensorType(int idx)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor.

    Returns
    Type Description
    TensorType

    The tensor type

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    View Source

    SetDimension(Int32, Int32[])

    Sets the tensor dimension with given index and dimension.

    Declaration
    public void SetDimension(int idx, int[] dimension)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor to be updated.

    Int32[] dimension

    The tensor dimension to be set.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference
    View Source

    SetTensorName(Int32, String)

    Sets the tensor name with given index.

    Declaration
    public void SetTensorName(int idx, string name)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor to be updated.

    String name

    The tensor name to be set.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference
    View Source

    SetTensorType(Int32, TensorType)

    Sets the tensor type with given index and its type.

    Declaration
    public void SetTensorType(int idx, TensorType type)
    Parameters
    Type Name Description
    Int32 idx

    The index of the tensor to be updated.

    TensorType type

    The tensor type to be set.

    Exceptions
    Type Condition
    IndexOutOfRangeException

    Thrown when the index is greater than the number of Tensor.

    ArgumentException

    Thrown when the method failed due to an invalid parameter.

    NotSupportedException

    Thrown when the feature is not supported.

    API Level: 6
    Feature: http://tizen.org/feature/machine_learning.inference

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2022 Samsung
    Generated by DocFX