def polish_model(model):  # type: (ModelProto) -> ModelProto
    '''
        This function combines several useful utility functions together.
    '''
    onnx.checker.check_model(model)
    onnx.helper.strip_doc_string(model)
    model = onnx.shape_inference.infer_shapes(model)
    model = onnx.optimizer.optimize(model)
    onnx.checker.check_model(model)
    return model
def polish_model ( model ) : onnx . checker . check_model ( model ) onnx . helper . strip_doc_string ( model ) model = onnx . shape_inference . infer_shapes ( model ) model = onnx . optimizer . optimize ( model ) onnx . checker . check_model ( model ) return model
This function combines several useful utility functions together.