shape_sequence.h#
Shape-inference functions for ONNX operators in the sequence family.
-
namespace ONNX_LIGHT_NAMESPACE
-
namespace onnx_optim
-
namespace shapes
-
namespace sequence#
Functions
-
void ComputeShapeSequenceConstruct(ShapesContext &ctx, const NodeProto &node)#
Computes the output :cpp:class:
OptimSequenceof aSequenceConstructnode and stores it inctx.SequenceConstruct(since opset 11 in theai.onnxdomain) takesN >= 1tensor inputs that share the same element type and produces a single tensor-sequence output of lengthN. The element dtype of the output sequence is the common dtype of the inputs; the ONNX schema does not require the inputs to share a common shape, so the output :cpp:class:OptimSequencerecords one :cpp:class:OptimShapeper input verbatim (see :cpp:func:OptimSequence::ElemShapes).When called with zero inputs, the output sequence has length
0, an unknown element dtype (:cpp:enumerator:TensorType::kUndefined) and an empty per-element shapes vector.- Parameters:
ctx – In/out context. Must already contain an :cpp:class:
OptimTensorentry for every named input ofnode; on return it also contains an :cpp:class:OptimSequenceentry fornode.output(0).node – The
SequenceConstructNodeProtowhose output should be described.node.op_type()must be"SequenceConstruct"andnodemust declare at least one output.
- Throws:
-
void ComputeShapeSequenceConstruct(ShapesContext &ctx, const NodeProto &node)#
-
namespace sequence#
-
namespace shapes
-
namespace onnx_optim