Method onesLike
static member onesLike: Tensor<'T> -> Tensor<'T>
Creates a new tensor filled with ones using the specified tensor as template.
Declaration
static member onesLike: tmpl:Tensor<'T> -> Tensor<'T>
Parameters
Type | Name | Description |
---|---|---|
Tensor<'T> | tmpl | The template tensor. |
Returns
Type | Description |
---|---|
Tensor<'T> | The new tensor. |
Remarks
A new tensor is created with the same shape and on the same device as tmpl
.
The tensor is filled with ones.