Handbook
Glossary
ones ( shape -- tensor )
Tensors
ยป
Creating Tensors
Prev:
zeros ( shape -- tensor )
Next:
naturals ( shape -- tensor )
Vocabulary
tensors
Inputs
shape
a
sequence
Outputs
tensor
a
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
USING:
tensors.private
;
IN:
tensors
:
ones
( shape -- tensor )
1
repetition
;