onnx_light.onnx.checker#

Checker helpers for onnx_light.

exception onnx_light.onnx.checker.ValidationError#

Raised when a model or proto fails validation.

onnx_light.onnx.checker.check_attribute(attribute: AttributeProto) None#

Checks an attribute and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the attribute is invalid.

onnx_light.onnx.checker.check_function_call_cycles(model: ModelProto) None#

Checks for cycles in model-local function call graph.

Raises:

ValidationError – If the model contains cyclic function references.

onnx_light.onnx.checker.check_graph(graph: GraphProto) None#

Checks a graph and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the graph is invalid.

onnx_light.onnx.checker.check_model(model: ModelProto) None#

Checks a model and raises checker.ValidationError on invalid content.

Returns:

None.

onnx_light.onnx.checker.check_sparse_tensor(sparse_tensor: SparseTensorProto) None#

Checks a sparse tensor and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the sparse tensor is invalid.