Shortcuts

mmengine.hub.get_config

mmengine.hub.get_config(cfg_path, pretrained=False)[源代码]

Get config from external package.

参数
  • cfg_path (str) – External relative config path.

  • pretrained (bool) – Whether to save pretrained model path. If pretrained==True, the url of pretrained model can be accessed by cfg.model_path. Defaults to False.

返回类型

mmengine.config.config.Config

实际案例

>>> cfg = get_config('mmdet::faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py', pretrained=True)
>>> # Equivalent to
>>> # cfg = Config.fromfile('/path/to/faster-rcnn_r50_fpn_1x_coco.py')
>>> cfg.model_path
https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth
返回

A Config parsed from external package.

返回类型

Config

参数
  • cfg_path (str) –

  • pretrained (bool) –

Read the Docs v: latest
Versions
latest
stable
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.