Struct TensorNDIterator
Represents a struct used to iterate over a TensorShape
.
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public struct TensorNDIterator
Constructors
Name | Description |
---|---|
TensorNDIterator(TensorNDIterator) | Returns a copy of another |
TensorNDIterator(TensorShape) | Initializes and returns an instance of |
TensorNDIterator(TensorShape, int) | Initializes and returns an instance of |
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 |
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. |