load

paddle.hub. load ( repo_dir, model, source='github', force_reload=False, **kwargs ) [source]

Load model

Parameters
  • repo_dir (str) –

    Github or local path.

    • github path (str): A string with format “repo_owner/repo_name[:tag_name]” with an optional tag/branch. The default branch is main if not specified.

    • local path (str): Local repo path.

  • model (str) – Model name.

  • source (str) – github | gitee | local. Default is github.

  • force_reload (bool, optional) – Default is False.

  • **kwargs – Parameters using for model.

Returns

paddle model.

Examples

>>> import paddle
>>> paddle.hub.load('lyuwenyu/paddlehub_demo:main', model='MM', source='github')