megengine.hub#

查询/使用预训练模型#

list

列出仓库 hubconf 中指定的所有可用的入口点。

load

从GitHub或GitLab中加载具有预训练权重的模型。

help

通过以下步骤,该函数返回入口点 entry 的docstring :

load_serialized_obj_from_url

加载给定URL中的MegEngine序列化对象。

pretrained

装饰器,用来标识预训练权重的 url,以便于载入时自动下载权重。

import_module

以类似python import的方式 import hubmodule。

抓取器#

synchronized

装饰器。

GitSSHFetcher

GitHTTPSFetcher

工具#

load_module

通过指定名字和路径加载模块。

check_module_exists

检查 python 模块是否存在。

cd

修改当前目录为目标目录。

异常处理#

FetcherError

获取异常相关错误的基类

GitCheckoutError

发生 git checkout 错误

GitPullError

发生git pull 错误

InvalidGitHost

提供的 git host 无故失效

InvalidProtocol

提供的协议无故失效

InvalidRepo

提供的仓库无故失效