Handbook
Glossary
reshape ( tensor shape -- tensor )
Tensors
ยป
Manipulating Tensors
Prev:
dims ( tensor -- n )
Next:
flatten ( tensor -- tensor )
Vocabulary
tensors
Inputs
tensor
a
tensor
shape
a
sequence
Outputs
tensor
a
tensor
Word description
Reshapes
tensor
to have shape
shape
.
Errors
Throws a
non-positive-shape-error
if the given shape has zero or negative values.
Definition
USING:
accessors
kernel
tensors.private
;
IN:
tensors
:
reshape
( tensor shape -- tensor )
[
dup
shape>>
]
[
check-shape
]
bi*
check-reshape
nip
>>shape
;