megengine.hub

查询/使用预训练模型

list

Lists all entrypoints available in repo hubconf.

load

Loads model from github or gitlab repo, with pretrained weights.

help

This function returns docstring of entrypoint entry by following steps:

load_serialized_obj_from_url

Loads MegEngine serialized object from the given URL.

pretrained

Decorator which helps to download pretrained weights from the given url.

import_module

Imports hubmodule like python import.

Fetcher

synchronized

Decorator.

GitSSHFetcher

GitHTTPSFetcher

Tools

load_module

Loads module specified by name and path.

check_module_exists

Checks whether python module exists or not.

cd

Changes current directory to target.

异常处理

FetcherError

Base class for fetch related error.

GitCheckoutError

A git checkout error occurred.

GitPullError

A git pull error occurred.

InvalidGitHost

The git host provided was somehow invalid.

InvalidProtocol

The protocol provided was somehow invalid.

InvalidRepo

The repo provided was somehow invalid.