towhee.models.utils.pretrained_utils.load_pretrained_weights(model, model_name=None, model_configs=None, weights_path=None)[source]

Load pretrained weights from path or url. :param model: Model. :type model: nn.Module :param model_name: Model name :type model_name: str :param model_configs: Model configs :type model_configs: dict :param weights_path: Path to pretrained weights file on the local disk. :type weights_path: str, optional :param verbose: If printing is done when downloading is over. :type verbose: bool