ones ( shape -- tensor )
Tensors ยป Creating Tensors

Prev:zeros ( shape -- tensor )
Next:naturals ( shape -- tensor )


Vocabulary
tensors

Inputs
shapea sequence


Outputs
tensora tensor


Word description
Initializes a tensor with shape shape containing all 1s.

Errors
Throws a non-positive-shape-error if the given shape has zero or negative values.

Definition