SequenceProto#
- class onnx_light.onnx.SequenceProto(*args, **kwargs)#
Defines a dense, ordered, collection of elements that are of homogeneous types. Sequences can be made out of tensors, maps, or sequences. If a sequence is made out of tensors, the tensors must have the same element type (i.e. int32). In some cases, the tensors in a sequence can have different shapes. Whether the tensors can have different shapes or not depends on the type/shape associated with the corresponding ValueInfo. For example, Sequence<Tensor<float, [M,N]> means that all tensors have same shape. However, Sequence<Tensor<float, [omitted,omitted]> means they can have different shapes (all of rank 2), where omitted means the corresponding dimension has no symbolic/constant value. Finally, Sequence<Tensor<float, omitted>> means that the different tensors can have different ranks, when the shape itself is omitted from the tensor-type. For a more complete description
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpy.SequenceProto, /) None#
Copies one instance into this one.
- class DataType(*values)#
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpy.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property elem_type#
The type of the elements in the sequence. The type of each element MUST match the elem_type specified. This field MUST be present for this version of the IR.
- property map_values#
For MapProto values. When this field is present, the elem_type field MUST be MAP.
- property name#
An optional identifier for this sequence.
- property optional_values#
For Optional values. When this field is present, the elem_type field MUST be OPTIONAL.
- property sequence_values#
For SequenceProto values. When this field is present, the elem_type field MUST be SEQUENCE.
- property sparse_tensor_values#
For SparseTensorProto values. When this field is present, the elem_type field MUST be SPARSE_TENSOR.
- property tensor_values#
For TensorProto values. When this field is present, the elem_type field MUST be TENSOR.