Class ITensor (mod)
Type-neutral interface to Tensor<'T> of any type 'T.
Inheritance
Namespace: Tensor
Assembly: Tensor.dll
Syntax
module ITensor
Remarks
These functions are useful for working with tensors of unknown types. For most use cases the functions provided by Tensor<'T> are better suited.
Methods
| Name | Description |
|---|---|
| val allIdx: ITensor -> seq<int64 list> | Gets a sequence of all indices to enumerate all elements within the tensor. |
| val atLeast1D: ITensor -> ITensor | Pads the tensor from the left with size-one dimensions until it has at least one dimension. |
| val atLeast2D: ITensor -> ITensor | Pads the tensor from the left with size-one dimensions until it has at least two dimensions. |
| val atLeast3D: ITensor -> ITensor | Pads the tensor from the left with size-one dimensions until it has at least three dimensions. |
| val atLeastND: int -> ITensor -> ITensor | Pads the tensor from the left with size-one dimensions until it has at least the specified number of dimensions. |
| val broadcastDim: int -> int64 -> ITensor -> ITensor | Broadcast a dimension to a specified size. |
| val broadcastTo: int64 list -> ITensor -> ITensor | Broadcasts the specified tensor to the specified shape. |
| val broadcastToSame: ITensor list -> ITensor list | Broadcasts all specified tensors to have the same shape. |
| val broadcastToSameInDims: seq<int> * ITensor list -> ITensor list | Broadcasts all specified tensors to have the same size in the specified dimensions. |
| val copy: ITensor -> ITensor | Returns a copy of the tensor. |
| val cutLeft: ITensor -> ITensor | Removes the first dimension. |
| val cutRight: ITensor -> ITensor | Removes the last dimension. |
| val dataType: ITensor -> Type | Type of data stored within the tensor. |
| val dev: ITensor -> ITensorDevice | Device the data of tensor is stored on. |
| val flatten: ITensor -> ITensor | Flattens the tensor into a (one-dimensional) vector. |
| val insertAxis: int -> ITensor -> ITensor | Insert a dimension of size one before the specifed dimension. |
| val isBroadcasted: ITensor -> bool | Checks if the specified tensor is broadcasted in at least one dimension. |
| val layout: ITensor -> TensorLayout | Memory layout of the tensor. |
| val nDims: ITensor -> int | Dimensionality of the tensor. |
| val nElems: ITensor -> int64 | Total number of elements within the tensor. |
| val padLeft: ITensor -> ITensor | Insert a dimension of size one as the first dimension. |
| val padRight: ITensor -> ITensor | Append a dimension of size one after the last dimension. |
| val padToSame: ITensor list -> ITensor list | Pads all specified tensors from the left with dimensions of size one until they have the same dimensionality. |
| val permuteAxes: int list -> ITensor -> ITensor | Permutes the axes as specified. |
| val range: Rng list -> ITensor -> ITensor | Get a slice (part) of the tensor. |
| val relayout: TensorLayout -> ITensor -> ITensor | Creates a tensor with the specified layout sharing its storage with the original tensor. |
| val reshape: int64 list -> ITensor -> ITensor | Changes the shape of a tensor. |
| val reshapeView: int64 list -> ITensor -> ITensor | Creates a reshaped view of the tensor (without copying). |
| val reverseAxis: int -> ITensor -> ITensor | Reverses the elements in the specified dimension. |
| val shape: ITensor -> int64 list | Shape of the tensor. |
| val swapDim: int -> int -> ITensor -> ITensor | Swaps the specified dimensions of the tensor. |
| val transfer: ITensorDevice -> ITensor -> ITensor | Transfers a tensor to the specifed device. |
| val transpose: ITensor -> ITensor | Transpose of a matrix. |
| val tryReshapeView: int64 list -> ITensor -> ITensor option | Tries to create a reshaped view of the tensor (without copying). |