docs.unity3d.com
    Show / Hide Table of Contents

    Class TensorBuilder

    Utility class to build tensors out of some common data types

    Inheritance
    Object
    TensorBuilder
    Namespace: UnityEngine.Perception.GroundTruth.DataModel
    Syntax
    public static class TensorBuilder : object

    Methods

    ToColor32(Tensor)

    Converts from a tensor into a color32 object

    Declaration
    public static Color32 ToColor32(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    The tensor to convert

    Returns
    Type Description
    Color32

    The converted object

    ToFloat3X3(Tensor)

    Converts from a tensor into a float3x3 object

    Declaration
    public static float3x3 ToFloat3X3(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    The tensor to convert

    Returns
    Type Description
    float3x3

    The converted object

    ToTensor(Color32)

    Converts a Color32 object into a tensor

    Declaration
    public static Tensor ToTensor(Color32 c)
    Parameters
    Type Name Description
    Color32 c

    The data to convert into a tensor

    Returns
    Type Description
    Tensor

    The tensor form of the data

    ToTensor(float3x3)

    Converts a float3x3 object into a tensor

    Declaration
    public static Tensor ToTensor(float3x3 f)
    Parameters
    Type Name Description
    float3x3 f

    The data to convert into a tensor

    Returns
    Type Description
    Tensor

    The tensor form of the data

    ToTensor(Vector2)

    Converts a Vector2 object into a tensor

    Declaration
    public static Tensor ToTensor(Vector2 v)
    Parameters
    Type Name Description
    Vector2 v

    The data to convert into a tensor

    Returns
    Type Description
    Tensor

    The tensor form of the data

    ToTensor(Vector3)

    Converts a Vector3 object into a tensor

    Declaration
    public static Tensor ToTensor(Vector3 v)
    Parameters
    Type Name Description
    Vector3 v

    The data to convert into a tensor

    Returns
    Type Description
    Tensor

    The tensor form of the data

    ToVector2(Tensor)

    Converts from a tensor into a Vector2 object

    Declaration
    public static Vector2 ToVector2(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    The tensor to convert

    Returns
    Type Description
    Vector2

    The converted object

    ToVector3(Tensor)

    Converts from a tensor into a Vector3 object

    Declaration
    public static Vector3 ToVector3(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    The tensor to convert

    Returns
    Type Description
    Vector3

    The converted object

    Back to top
    Terms of use
    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