get_weights_path_from_url¶
- paddle.utils.download. get_weights_path_from_url ( url, md5sum=None ) [source]
-
Get weights path from WEIGHT_HOME, if not exists, download it from url.
- Parameters
-
url (str) – download url
md5sum (str) – md5 sum of download package
- Returns
-
a local path to save downloaded weights.
- Return type
-
str
Examples
>>> from paddle.utils.download import get_weights_path_from_url >>> resnet18_pretrained_weight_url = 'https://paddle-hapi.bj.bcebos.com/models/resnet18.pdparams' >>> local_weight_path = get_weights_path_from_url(resnet18_pretrained_weight_url)