From ac493f2c720da0e0e11e3fe8eeaa09e550fd474d Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Thu, 11 Mar 2021 18:57:21 +0800 Subject: [PATCH] Update comments for API `RandomResizedCrop` (#31539) * update comments --- python/paddle/utils/download.py | 38 ------------------- python/paddle/vision/transforms/transforms.py | 3 +- 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/python/paddle/utils/download.py b/python/paddle/utils/download.py index 3af9a83f6a2..b7d7d0b5adb 100644 --- a/python/paddle/utils/download.py +++ b/python/paddle/utils/download.py @@ -61,44 +61,6 @@ WEIGHTS_HOME = osp.expanduser("~/.cache/paddle/hapi/weights") DOWNLOAD_RETRY_LIMIT = 3 -nlp_models = OrderedDict(( - ('RoBERTa-zh-base', - 'https://bert-models.bj.bcebos.com/chinese_roberta_wwm_ext_L-12_H-768_A-12.tar.gz' - ), - ('RoBERTa-zh-large', - 'https://bert-models.bj.bcebos.com/chinese_roberta_wwm_large_ext_L-24_H-1024_A-16.tar.gz' - ), - ('ERNIE-v2-en-base', - 'https://ernie.bj.bcebos.com/ERNIE_Base_en_stable-2.0.0.tar.gz'), - ('ERNIE-v2-en-large', - 'https://ernie.bj.bcebos.com/ERNIE_Large_en_stable-2.0.0.tar.gz'), - ('XLNet-cased-base', - 'https://xlnet.bj.bcebos.com/xlnet_cased_L-12_H-768_A-12.tgz'), - ('XLNet-cased-large', - 'https://xlnet.bj.bcebos.com/xlnet_cased_L-24_H-1024_A-16.tgz'), - ('ERNIE-v1-zh-base', - 'https://baidu-nlp.bj.bcebos.com/ERNIE_stable-1.0.1.tar.gz'), - ('ERNIE-v1-zh-base-max-len-512', - 'https://ernie.bj.bcebos.com/ERNIE_1.0_max-len-512.tar.gz'), - ('BERT-en-uncased-large-whole-word-masking', - 'https://bert-models.bj.bcebos.com/wwm_uncased_L-24_H-1024_A-16.tar.gz'), - ('BERT-en-cased-large-whole-word-masking', - 'https://bert-models.bj.bcebos.com/wwm_cased_L-24_H-1024_A-16.tar.gz'), - ('BERT-en-uncased-base', - 'https://bert-models.bj.bcebos.com/uncased_L-12_H-768_A-12.tar.gz'), - ('BERT-en-uncased-large', - 'https://bert-models.bj.bcebos.com/uncased_L-24_H-1024_A-16.tar.gz'), - ('BERT-en-cased-base', - 'https://bert-models.bj.bcebos.com/cased_L-12_H-768_A-12.tar.gz'), - ('BERT-en-cased-large', - 'https://bert-models.bj.bcebos.com/cased_L-24_H-1024_A-16.tar.gz'), - ('BERT-multilingual-uncased-base', - 'https://bert-models.bj.bcebos.com/multilingual_L-12_H-768_A-12.tar.gz'), - ('BERT-multilingual-cased-base', - 'https://bert-models.bj.bcebos.com/multi_cased_L-12_H-768_A-12.tar.gz'), - ('BERT-zh-base', - 'https://bert-models.bj.bcebos.com/chinese_L-12_H-768_A-12.tar.gz'), )) - def is_url(path): """ diff --git a/python/paddle/vision/transforms/transforms.py b/python/paddle/vision/transforms/transforms.py index a244d447829..7d3d5f525c2 100644 --- a/python/paddle/vision/transforms/transforms.py +++ b/python/paddle/vision/transforms/transforms.py @@ -407,7 +407,8 @@ class RandomResizedCrop(BaseTransform): Args: size (int|list|tuple): Target size of output image, with (height, width) shape. - scale (list|tuple): Range of size of the origin size cropped. Default: (0.08, 1.0) + scale (list|tuple): Scale range of the cropped image before resizing, relatively to the origin + image. Default: (0.08, 1.0) ratio (list|tuple): Range of aspect ratio of the origin aspect ratio cropped. Default: (0.75, 1.33) interpolation (int|str, optional): Interpolation method. Default: 'bilinear'. when use pil backend, support method are as following: -- GitLab