docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Reshape

    Represents a Reshape layer. The layer calculates the output tensor by copying the data from the input tensor and using a given shape. The data from the input tensor is unchanged.

    Only one of the elements of the shape can be -1. The layer infers the size of this dimension from the remaining dimensions and the length of the input tensor.

    Inheritance
    object
    Layer
    Reshape
    Inherited Members
    Layer.inputs
    Layer.name
    Layer.outputs
    Layer.flags
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Sentis.Layers
    Assembly: solution.dll
    Syntax
    [Serializable]
    public class Reshape : Layer

    Constructors

    Name Description
    Reshape(string, string, string, bool)

    Initializes and returns an instance of Reshape layer.

    Fields

    Name Description
    allowZero

    Whether to handle zeros in the shape like numpy.

    If the shape has a dimension of size 0 and allowZero is true, the output tensor has a dimension of size zero in the same place.

    If the shape has a dimension of size 0 and if allowZero is false, the output tensor has the same dimension as the input tensor at this axis.

    Methods

    Name Description
    Execute(Tensor[], ExecutionContext)

    Executes the layer using the operations and variables from the ExecutionContext and returns the output tensor.

    If the layer has more than one output, output tensors are saved to variables.

    ToString()

    Returns a string that represents the Layer.

    In This Article
    Back to top
    Copyright © 2024 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)