Tensor Shape Structure
Represents the shape (dimensions) of a tensor.
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
C#
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
public readonly struct TensorShape : IEquatable<TensorShape>
- Implements
- IEquatable<TensorShape>
Constructors
Tensor | Constructs a new tensor shape with the specified dimensions. |
Properties
Dimensions | Gets a span containing the dimensions of the shape. |
Element | Gets the total number of elements in the shape. |
Item[Index] | Gets the size of the specified dimension. |
Item[Int32] | Gets the size of the specified dimension. |
Rank | Gets the number of dimensions. |
Methods
Append | Adds a dimension of the specified size to the end of the current shape. |
AsSpan | Returns the dimensions of the tensor shape as a readonly span of integers. |
Broadcast(TensorShape[]) | Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes. |
Broadcast( | Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes. |
Broadcast( | Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes. |
Can | Gets whether this shape can be broadcast into from another shape. |
Can | Gets whether this shape can be broadcast into another shape. |
Can | Returns whether a shape is entirely contained within another shape. |
Column | Represents the shape of a column vector of the specified length. |
Create | Returns the shape of an array. |
Equals( | Determines whether the specified object is equal to the current object. (Overrides ValueType.Equals(Object)) |
Equals( | Compares this shape to another shape. |
Get | Serves as the default hash function. (Overrides ValueType.GetHashCode()) |
Get | Gets the Type of the current instance. (Inherited from Object) |
Insert( | Inserts a dimension of the specified size at the specified position in the current shape. |
Insert( | Inserts a dimension of the specified size at the specified position in the current shape. |
Remove | Removes the specified dimensions from the current shape. |
Remove | Returns a new tensor shape with the specified axis removed. |
Remove | Returns a new tensor shape with the specified axis removed. |
Row | Represents the shape of a row vector of the specified length. |
Swap | Returns a new tensor shape that has the dimensions along the specified axes swapped. |
Swap | Returns a new tensor shape that has the dimensions along the specified axes swapped. |
ToString | Returns the fully qualified type name of this instance. (Overrides ValueType.ToString()) |
Try | Attempts to compute the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes. |
Vector | Represents the shape of a vector of the specified length. |
With | Replaces the specified dimensions with the specified size. |
With | Returns a tensor shape that has one dimension changed from this shape. |
With | Returns a tensor shape that has one dimension changed from this shape. |
Operators
Fields
Scalar | Represents the shape of a scalar, a 0-dimensional tensor. |