Coverage for mlprodict/onnxrt/ops_cpu/op_sequence_construct.py: 81%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- encoding: utf-8 -*-
2# pylint: disable=E0203,E1101,C0111
3"""
4@file
5@brief Runtime operator.
7.. versionadded:: 0.7
8"""
9from ._op import OpRun
10from ..shape_object import ShapeObject
13class SequenceConstruct(OpRun):
15 atts = {}
17 def __init__(self, onnx_node, desc=None, **options):
18 OpRun.__init__(self, onnx_node, desc=desc,
19 atts=SequenceConstruct.atts, **options)
21 def _run(self, *data): # pylint: disable=W0221
22 return (data, )
24 def _infer_shapes(self, *data): # pylint: disable=W0221
25 return (ShapeObject(None, dtype="sequence", subtype=data[0]), )
27 def _infer_types(self, *data): # pylint: disable=W0221
28 return (list, )
30 def _infer_sizes(self, *args): # pylint: disable=W0221
31 res = self.run(*args)
32 return (dict(temp=0), ) + res