Method ofSeqWithShape
val ofSeqWithShape: int64 list -> seq<'T> -> Tensor<'T>
Creates a one-dimensional Tensor using the specified sequence and shape.
Declaration
val ofSeqWithShape: shape:int64 list -> data:seq<'T> -> Tensor<'T>
Parameters
| Type | Name | Description |
|---|---|---|
| int64 list | shape | The shape of the new tensor. |
| seq<'T> | data | The data to fill the tensor with. |
Returns
| Type | Description |
|---|---|
| Tensor<'T> | A tensor containing values from the specifed sequence. |
Type Parameters
| Name | Description |
|---|---|
| 'T | The type of the data. |
Remarks
Only the number of elements required to fill the tensor of the specified shape are consumed from the sequence. Thus it may be infinite.