コード例 #1
0
def export(name, framework, trt):
    """
    Export model from PyTorch hub / TensorFlow hub and try convert the model into various format for different serving
    engines.
    """
    export_model(model_name=name, framework=framework, enable_trt=trt)
    exit(0)
コード例 #2
0
ファイル: modelhub.py プロジェクト: univerone/ML-Model-CI
def export(
        name: str = typer.Option(..., '-n', '--name', help='Architecture'),
        framework: Optional[Framework] = typer.Option(None, '-fw', '--framework', case_sensitive=False,
                                                      help='Framework'),
        trt: Optional[bool] = typer.Option(
            False,
            is_flag=True,
            help='Flag for exporting models served by TensorRT. Please make sure you have TensorRT installed in your '
                 'machine before set this flag.')
):
    """
    Export model from PyTorch hub / TensorFlow hub and try convert the model into various format for different serving
    engines.
    """
    from modelci.hub.init_data import export_model

    export_model(model_name=name, framework=framework, enable_trt=trt)