furiosa.optimizer.frontend.onnx.utils package

Submodules

furiosa.optimizer.frontend.onnx.utils.check_model module

furiosa.optimizer.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.optimizer.frontend.onnx.utils.inference_shape module

class furiosa.optimizer.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.optimizer.frontend.onnx.utils.version_checker module

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

Bases: furiosa.optimizer.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