check-stack-shape ( seq -- seq )


Vocabulary
tensors.private

Inputs
seqan object


Outputs
seqan object


Definition


:: 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 ;