Handbook
Glossary
check-stack-shape ( seq -- seq )
Vocabulary
tensors
.
private
Inputs
seq
an
object
Outputs
seq
an
object
Definition
USING:
accessors
kernel
sequences
tensors
;
IN:
tensors.private
::
check-stack-shape
( seq -- seq )
seq
first
{
}
>tensor
dup
:>
empty-tensor
like
shape>>
:>
first-shape seq
[
empty-tensor
like
dup
shape>>
first-shape
=
[
shape>>
first-shape
swap
shape-mismatch-error
]
unless
]
map
;