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