docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TensorNDIterator

    Represents a struct used to iterate over a TensorShape.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Sentis
    Assembly: solution.dll
    Syntax
    public struct TensorNDIterator

    Constructors

    Name Description
    TensorNDIterator(TensorNDIterator)

    Returns a copy of another TensorNDIterator.

    TensorNDIterator(TensorShape)

    Initializes and returns an instance of TensorNDIterator with a given shape.

    TensorNDIterator(TensorShape, int)

    Initializes and returns an instance of TensorNDIterator with a given shape, and uses a given index in the flattened 1D version of the shape.

    Fields

    Name Description
    index

    The 1D flattened index.

    Properties

    Name Description
    this[int]

    Gets or sets the iterator at a given axis.

    shape

    The shape that is iterated over.

    Methods

    Name Description
    Broadcast(TensorShape)

    Creates a new iterator by broadcasting this iterator on a given shape following the broadcast rule.

    CopyNDIndex(TensorNDIterator)

    Copies the dimension indices from another iterator. If the shapes of the iterators are not the same the final flattened index may be different.

    HasNext()

    Whether the iterator is yet to reach the end of the shape.

    HasNext(int)

    Whether the iterator is yet to reach the end of the shape on a given axis.

    MoveNext()

    Increments the flattened index by one.

    MoveNextAxis(int)

    Increments the index at a given axis by one.

    RemoveDim(int)

    Creates a new iterator by skipping an axis of this iterator.

    Reset()

    Resets the iterator to the start of the shape.

    ToString()

    Returns a string that represents the TensorNDIterator.

    Transpose()

    Creates a new iterator by transposing this iterator reversing the axes.

    Transpose(int[])

    Creates a new iterator by transposing this iterator using the given permutations.

    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)