MCPcopy
hub / github.com/onnx/onnx / make_tensor_value_info

Function make_tensor_value_info

onnx/helper.py:830–845  ·  view source on GitHub ↗

Makes a ValueInfoProto based on the data type and shape.

(
    name: str,
    elem_type: int,
    shape: Sequence[str | int | None] | None,
    doc_string: str = "",
    shape_denotation: list[str] | None = None,
)

Source from the content-addressed store, hash-verified

828
829
830def make_tensor_value_info(
831 name: str,
832 elem_type: int,
833 shape: Sequence[str | int | None] | None,
834 doc_string: str = "",
835 shape_denotation: list[str] | None = None,
836) -> ValueInfoProto:
837 """Makes a ValueInfoProto based on the data type and shape."""
838 value_info_proto = ValueInfoProto()
839 value_info_proto.name = name
840 if doc_string:
841 value_info_proto.doc_string = doc_string
842
843 tensor_type_proto = make_tensor_type_proto(elem_type, shape, shape_denotation)
844 value_info_proto.type.CopyFrom(tensor_type_proto)
845 return value_info_proto
846
847
848def make_sparse_tensor_type_proto(

Calls 1

make_tensor_type_protoFunction · 0.85

Tested by 15

test_binarizerMethod · 0.72
test_scalerMethod · 0.72
test_normalizerMethod · 0.72
test_imputer_floatMethod · 0.72
test_imputer_float_2dMethod · 0.72
test_imputer_intMethod · 0.72
test_dict_vectorizerMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…