furiosa.quantizer.frontend.onnx.utils package

Submodules

furiosa.quantizer.frontend.onnx.utils.check_model module

furiosa.quantizer.frontend.onnx.utils.check_model.check_model(model: onnx.onnx_ml_pb2.ModelProto, check_runnable: bool = True) None

Check if model’s well-defined and executable on onnxruntime

furiosa.quantizer.frontend.onnx.utils.inference_shape module

class furiosa.quantizer.frontend.onnx.utils.inference_shape.InferenceShape(model: onnx.onnx_ml_pb2.ModelProto)

Bases: object

Replace former InferenceShape with ONNX_Simplifier https://github.com/daquexian/onnx-simplifier

inference_shape(input_shapes: Optional[Dict[str, List[int]]] = None) onnx.onnx_ml_pb2.ModelProto

furiosa.quantizer.frontend.onnx.utils.version_checker module

class furiosa.quantizer.frontend.onnx.utils.version_checker.CheckVersion(opset_version: Optional[int] = None)

Bases: furiosa.quantizer.interfaces.transformer.Transformer[onnx.onnx_ml_pb2.ModelProto]

Convert an ONNX model to ONNX opset 12 or 13

opset_bound = [12, 13]
transform(model: onnx.onnx_ml_pb2.ModelProto) onnx.onnx_ml_pb2.ModelProto

Module contents