megengine.hub.load¶
- load(repo_info, entry, *args, git_host=DEFAULT_GIT_HOST, use_cache=True, commit=None, protocol=DEFAULT_PROTOCOL, **kwargs)[source]¶
Loads model from github or gitlab repo, with pretrained weights.
- Parameters
repo_info (
str
) – a string with format"repo_owner/repo_name[:tag_name/:branch_name]"
with an optional tag/branch. The default branch ismaster
if not specified. Eg:"brain_sdk/MegBrain[:hub]"
entry (
str
) – an entrypoint defined in hubconf.git_host (
str
) – host address of git repo. Eg: github.comuse_cache (
bool
) – whether to use locally cached code or completely re-fetch.protocol (
str
) – which protocol to use to get the repo, and HTTPS protocol only supports public repo on github. The value should be one of HTTPS, SSH.
- Return type
- Returns
a single model with corresponding pretrained weights.