Method NewOfType
static member NewOfType: int64 list * Type * ITensorDevice * TensorOrder option -> ITensor
Type-neutral function for creating a new, uninitialized tensor with a new storage.
Declaration
static member NewOfType: shape:int64 list * dataType:Type * dev:ITensorDevice * order:TensorOrder option -> ITensor
Parameters
Type | Name | Description |
---|---|---|
int64 list | shape | The shape of the tensor to create. |
System.Type | dataType | The data type of the tensor to create. |
ITensorDevice | dev | The device to store the data of the tensor on. |
TensorOrder option | order | The memory layout to use for the new tensor. |
Returns
Type | Description |
---|---|
ITensor | The new, uninitialized tensor. |
Remarks
The contents of the new tensor are undefined.
Use this function only if you require a type-neutral function. The recommended way is to use static member zeros: ITensorDevice -> int64 list -> Tensor<'T> to create a typed tensor.