Shortcuts

mmcls.apis.init_model

mmcls.apis.init_model(config, checkpoint=None, device='cuda:0', options=None)[source]

Initialize a classifier from config file.

Parameters
  • config (str or mmcv.Config) – Config file path or the config object.

  • checkpoint (str, optional) – Checkpoint path. If left as None, the model will not load any weights.

  • options (dict) – Options to override some settings in the used config.

Returns

The constructed classifier.

Return type

nn.Module

Read the Docs v: latest
Versions
master
latest
1.x
dev-1.x
Downloads
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.