Skip to content

Commit 2408e14

Browse files
Merge branch 'develop' into new_op1
2 parents 02253f9 + d2aa7c3 commit 2408e14

File tree

17 files changed

+316
-29
lines changed

17 files changed

+316
-29
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Paddle API Docs
2-
docs/api/paddle @jzhang533 @sunzhongkai588 @mattheliu
2+
docs/api/paddle @jzhang533 @sunzhongkai588 @mattheliu @Echo-Nie

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ repos:
1818
types: [text]
1919
- id: remove-tabs
2020
types: [text]
21+
- repo: https://github.com/PFCCLab/typos-pre-commit-mirror.git
22+
rev: v1.38.1
23+
hooks:
24+
- id: typos
25+
args: [--force-exclude]
2126
# Document hooks
2227
- repo: https://github.com/PFCCLab/dochooks
2328
rev: v0.6.0

_typos.toml

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
[files]
2+
# The following files will be excluded from spell check during commits
3+
extend-exclude = []
4+
5+
[default]
6+
# Ignore 1-3 letter words, refer to https://github.com/crate-ci/typos/issues/1079
7+
extend-ignore-words-re = ["^[a-zA-Z]{1,3}$"]
8+
# refer to https://github.com/crate-ci/typos/blob/master/docs/reference.md#example-configurations
9+
extend-ignore-re = [
10+
# Ignore lines by `# typos: disable-line`
11+
"(?Rm)^.*(#|//)\\s*typos:\\s*disable-line$",
12+
# Ignore block by `# typos: off` and `# typos: on`
13+
"(?s)(#|//)\\s*typos:\\s*off.*?\\n\\s*(#|//)\\s*typos:\\s*on"
14+
]
15+
16+
[default.extend-words]
17+
# PaddlePaddle specific words
18+
CANN = "CANN"
19+
Clas = "Clas"
20+
arange = "arange"
21+
22+
# These words need to be fixed
23+
Accuray = "Accuray"
24+
Adventages = "Adventages"
25+
Archetecture = "Archetecture"
26+
Asynchoronous = "Asynchoronous"
27+
Attrbute = "Attrbute"
28+
Attribtue = "Attribtue"
29+
Bounary = "Bounary"
30+
Classfication = "Classfication"
31+
Comparision = "Comparision"
32+
Contructing = "Contructing"
33+
Creenshot = "Creenshot"
34+
DELCARE = "DELCARE"
35+
Dateset = "Dateset"
36+
Discription = "Discription"
37+
Distrbuted = "Distrbuted"
38+
Driect = "Driect"
39+
Embeddding = "Embeddding"
40+
Embeding = "Embeding"
41+
Engish = "Engish"
42+
Fasle = "Fasle"
43+
Flase = "Flase"
44+
Generater = "Generater"
45+
Gloabal = "Gloabal"
46+
Imporvement = "Imporvement"
47+
Interfce = "Interfce"
48+
Kernal = "Kernal"
49+
Learing = "Learing"
50+
Moible = "Moible"
51+
Nervana = "Nervana"
52+
Numberic = "Numberic"
53+
Operaton = "Operaton"
54+
Optimizaing = "Optimizaing"
55+
Optimzier = "Optimzier"
56+
Paremeter = "Paremeter"
57+
Pipline = "Pipline"
58+
Porgram = "Porgram"
59+
Prallel = "Prallel"
60+
Propegation = "Propegation"
61+
Propogation = "Propogation"
62+
Protocal = "Protocal"
63+
Pyhton = "Pyhton"
64+
REGISTE = "REGISTE"
65+
Reivew = "Reivew"
66+
Reuqest = "Reuqest"
67+
Setment = "Setment"
68+
Similarily = "Similarily"
69+
Simle = "Simle"
70+
Sovler = "Sovler"
71+
Successed = "Successed"
72+
Tansformer = "Tansformer"
73+
Tenosr = "Tenosr"
74+
Traning = "Traning"
75+
Transfomed = "Transfomed"
76+
Tthe = "Tthe"
77+
Ture = "Ture"
78+
Useage = "Useage"
79+
Varialble = "Varialble"
80+
Varible = "Varible"
81+
Varient = "Varient"
82+
Wether = "Wether"
83+
accordding = "accordding"
84+
accoustic = "accoustic"
85+
accpetance = "accpetance"
86+
accracy = "accracy"
87+
acutal = "acutal"
88+
apporach = "apporach"
89+
apporaches = "apporaches"
90+
arguements = "arguements"
91+
arguemnts = "arguemnts"
92+
assgin = "assgin"
93+
assginment = "assginment"
94+
auxilary = "auxilary"
95+
avaiable = "avaiable"
96+
baisc = "baisc"
97+
basci = "basci"
98+
beacuse = "beacuse"
99+
bechmark = "bechmark"
100+
benckmark = "benckmark"
101+
boradcast = "boradcast"
102+
brodcast = "brodcast"
103+
caculate = "caculate"
104+
cantains = "cantains"
105+
choosen = "choosen"
106+
classfication = "classfication"
107+
classfy = "classfy"
108+
cliping = "cliping"
109+
colunms = "colunms"
110+
commmit = "commmit"
111+
complie = "complie"
112+
condtional = "condtional"
113+
conjuction = "conjuction"
114+
containg = "containg"
115+
contruct = "contruct"
116+
contructed = "contructed"
117+
contruction = "contruction"
118+
contxt = "contxt"
119+
convertion = "convertion"
120+
convinience = "convinience"
121+
correponding = "correponding"
122+
corresonding = "corresonding"
123+
correspoinding = "correspoinding"
124+
corss = "corss"
125+
creatation = "creatation"
126+
creats = "creats"
127+
dafault = "dafault"
128+
datas = "datas"
129+
decribe = "decribe"
130+
decribes = "decribes"
131+
deocder = "deocder"
132+
desgin = "desgin"
133+
desginated = "desginated"
134+
desigin = "desigin"
135+
determinated = "determinated"
136+
diffcult = "diffcult"
137+
dimention = "dimention"
138+
dimentions = "dimentions"
139+
dirrectories = "dirrectories"
140+
disucssion = "disucssion"
141+
egde = "egde"
142+
enviornment = "enviornment"
143+
erros = "erros"
144+
evalute = "evalute"
145+
exampels = "exampels"
146+
exection = "exection"
147+
exlusive = "exlusive"
148+
exmaple = "exmaple"
149+
exsits = "exsits"
150+
feeded = "feeded"
151+
flaot = "flaot"
152+
fliters = "fliters"
153+
follwing = "follwing"
154+
formated = "formated"
155+
formater = "formater"
156+
forword = "forword"
157+
foward = "foward"
158+
functinal = "functinal"
159+
fundemental = "fundemental"
160+
funtion = "funtion"
161+
gard = "gard"
162+
generaly = "generaly"
163+
gloabl = "gloabl"
164+
heigh = "heigh"
165+
ilter = "ilter"
166+
imge = "imge"
167+
implememted = "implememted"
168+
indeces = "indeces"
169+
indentical = "indentical"
170+
indicies = "indicies"
171+
indx = "indx"
172+
infered = "infered"
173+
inferface = "inferface"
174+
infor = "infor"
175+
ingore = "ingore"
176+
instert = "instert"
177+
instrinsics = "instrinsics"
178+
interchangable = "interchangable"
179+
intializers = "intializers"
180+
intput = "intput"
181+
lable = "lable"
182+
learing = "learing"
183+
legth = "legth"
184+
lengthes = "lengthes"
185+
lenth = "lenth"
186+
leran = "leran"
187+
libary = "libary"
188+
likey = "likey"
189+
mantained = "mantained"
190+
matrics = "matrics"
191+
mdule = "mdule"
192+
mechnism = "mechnism"
193+
memeory = "memeory"
194+
memroy = "memroy"
195+
messege = "messege"
196+
metaphore = "metaphore"
197+
metrices = "metrices"
198+
muliply = "muliply"
199+
mulitplying = "mulitplying"
200+
mutbale = "mutbale"
201+
neeeded = "neeeded"
202+
nessesary = "nessesary"
203+
numberic = "numberic"
204+
occurence = "occurence"
205+
opeartor = "opeartor"
206+
opeartors = "opeartors"
207+
operaters = "operaters"
208+
optmization = "optmization"
209+
outpu = "outpu"
210+
outpus = "outpus"
211+
overrided = "overrided"
212+
overwrited = "overwrited"
213+
palce = "palce"
214+
parammeters = "parammeters"
215+
poniter = "poniter"
216+
porcess = "porcess"
217+
processer = "processer"
218+
promot = "promot"
219+
propegation = "propegation"
220+
provicded = "provicded"
221+
recevied = "recevied"
222+
recomment = "recomment"
223+
registerd = "registerd"
224+
registring = "registring"
225+
reivew = "reivew"
226+
relase = "relase"
227+
requirments = "requirments"
228+
resut = "resut"
229+
resuts = "resuts"
230+
sacle = "sacle"
231+
samle = "samle"
232+
satifies = "satifies"
233+
schedual = "schedual"
234+
secenarios = "secenarios"
235+
sematic = "sematic"
236+
seperator = "seperator"
237+
setted = "setted"
238+
shoule = "shoule"
239+
similary = "similary"
240+
simplier = "simplier"
241+
skiped = "skiped"
242+
softwares = "softwares"
243+
sould = "sould"
244+
specail = "specail"
245+
sperated = "sperated"
246+
splited = "splited"
247+
splitted = "splitted"
248+
stirng = "stirng"
249+
stradegy = "stradegy"
250+
subract = "subract"
251+
sucess = "sucess"
252+
sucessor = "sucessor"
253+
sucessors = "sucessors"
254+
szie = "szie"
255+
tempory = "tempory"
256+
tenosr = "tenosr"
257+
thier = "thier"
258+
traget = "traget"
259+
traing = "traing"
260+
trainning = "trainning"
261+
traning = "traning"
262+
transfered = "transfered"
263+
trasformed = "trasformed"
264+
treshold = "treshold"
265+
trian = "trian"
266+
unqiue = "unqiue"
267+
unsupport = "unsupport"
268+
updte = "updte"
269+
utill = "utill"
270+
varialbes = "varialbes"
271+
varibale = "varibale"
272+
varibales = "varibales"
273+
varience = "varience"
274+
varient = "varient"
275+
visting = "visting"
276+
warpped = "warpped"
277+
wether = "wether"
278+
wiht = "wiht"
279+
wirte = "wirte"
280+
workign = "workign"
281+
wraper = "wraper"
282+
writter = "writter"

docs/api/gen_doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,23 +696,23 @@ def check_cn_en_match(path="./paddle", diff_file="en_cn_files_diff"):
696696
"""
697697
osp_join = os.path.join
698698
osp_exists = os.path.exists
699-
with open(diff_file, "w") as fo:
699+
with open(diff_file, "w") as f:
700700
tmpl = "{}\t{}\n"
701-
fo.write(tmpl.format("exist", "not_exits"))
701+
f.write(tmpl.format("exist", "not_exits"))
702702
for root, dirs, files in os.walk(path):
703703
for file in files:
704704
if file.endswith(en_suffix):
705705
cf = file.replace(en_suffix, cn_suffix)
706706
if not osp_exists(osp_join(root, cf)):
707-
fo.write(
707+
f.write(
708708
tmpl.format(
709709
osp_join(root, file), osp_join(root, cf)
710710
)
711711
)
712712
elif file.endswith(cn_suffix):
713713
ef = file.replace(cn_suffix, en_suffix)
714714
if not osp_exists(osp_join(root, ef)):
715-
fo.write(
715+
f.write(
716716
tmpl.format(
717717
osp_join(root, file), osp_join(root, ef)
718718
)

docs/api/paddle/DataParallel_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ DataParallel
1414

1515
1. 使用 ``paddle.distributed.spawn`` 方法启动,例如:
1616

17-
``python demo.py`` (spawn need to be called in ``__main__`` method)
17+
``python demo.py`` (spawn need to be called in ``__main__`` method)
1818

1919
2. 使用 ``paddle.distributed.launch`` 方法启动,例如:
2020

docs/api/paddle/audio/features/LogMelSpectrogram_cn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ LogMelSpectrogram
1414
- **n_fft** (int,可选) - 离散傅里叶变换中频率窗大小,默认 512。
1515
- **hop_length** (int,可选) - 帧移,默认 512。
1616
- **win_length** (int,可选) - 短时 FFT 的窗长,默认为 None。
17-
- **window** (str,可选) - 窗函数名,支持的窗函数类型'hamming','hann','gaussian','general_gaussian','exponential','triang','bohman','blackman','cosine','tukey','taylor','bartlett','kaiser','nuttall',默认``hann``。
17+
- **window** (str,可选) - 窗函数名,支持的窗函数类型'hamming','hann','gaussian','general_gaussian','exponential','triang','bohman','blackman','cosine','tukey','taylor','bartlett','kaiser','nuttall',默认 ``hann``
1818
- **power** (float,可选) - 幅度谱的指数,默认是 2.0。
1919
- **center** (bool,可选) - 对输入信号填充,如果 True,那么 t 以 t*hop_length 为中心,如果为 False,则 t 以 t*hop_length 开始,默认是 True。
2020
- **pad_mode** (str,可选) - 如果 center 是 True,选择填充的方式,默认值是'reflect'。
2121
- **n_mels** (int,可选) - mel bins 的数目,默认是 64。
2222
- **f_min** (float,可选) - 最小频率(hz),默认 50.0。
2323
- **f_max** (float,可选) - 最大频率(hz),默认为 None。
2424
- **htk** (bool,可选) - 在计算 fbank 矩阵时是否用在 HTK 公式缩放,默认是 False。
25-
- **norm** (Union[str,float],可选) - 计算 fbank 矩阵时正则化的种类,默认是``slaney``,你也可以 norm=0.5,使用 p-norm 正则化。
25+
- **norm** (Union[str,float],可选) - 计算 fbank 矩阵时正则化的种类,默认是 ``slaney`` ,你也可以 norm=0.5,使用 p-norm 正则化。
2626
- **ref_value** (float,可选) - 参照值,如果小于 1.0,信号的 db 会被提升,相反 db 会下降,默认值为 1.0。
2727
- **amin** (float,可选) - 输入的幅值的最小值,默认是 1e-10。
2828
- **top_db** (float,可选) - log-mel 谱的最大值(db),默认是 None。
29-
- **dtype** (str|paddle.dtype|np.dtype,可选) - 输入和窗的数据类型,默认是``float32``。
29+
- **dtype** (str|paddle.dtype|np.dtype,可选) - 输入和窗的数据类型,默认是 ``float32``
3030

3131

3232
返回

docs/api/paddle/audio/functional/compute_fbank_matrix_cn.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ compute_fbank_matrix
1616
- **f_min** (float,可选) - 最小频率(hz),默认是 0.0。
1717
- **f_max** (Optional[float],可选) - 最大频率(hz),默认是 None。
1818
- **htk** (bool,可选) - 是否使用 htk 缩放,默认是 False。
19-
- **norm** (Union[str, float],可选) - norm 的类型,默认是``slaney``。
20-
- **dtype** (str|paddle.dtype|np.dtype,可选) - 返回矩阵的数据类型,默认``float32``。
19+
- **norm** (Union[str, float],可选) - norm 的类型,默认是 ``slaney``。
20+
- **dtype** (str|paddle.dtype|np.dtype,可选) - 返回矩阵的数据类型,默认 ``float32``
2121

2222
返回
2323
:::::::::
2424

25-
``paddle.Tensor``,Tensor shape (n_mels, n_fft//2 + 1)。
25+
``paddle.Tensor`` ,Tensor shape (n_mels, n_fft//2 + 1)。
2626

2727
代码示例
2828
:::::::::

docs/api/paddle/bucketize_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ bucketize
1111
- **x** (Tensor) - 输入的 N 维 Tensor,支持的数据类型:int32、int64、float32、float64。
1212
- **sorted_sequence** (Tensor) - 输入的一维 Tensor,支持的数据类型:int32、int64、float32、float64。该 Tensor 的数值在其最后一个维度递增。
1313
- **out_int32** (bool,可选) - 输出的数据类型支持 int32、int64。默认值为 False,表示默认的输出数据类型为 int64。
14-
- **right** (bool,可选) - 根据给定 ``x`` 在 ``sorted_sequence`` 查找对应的上边界或下边界。如果 ``sorted_sequence``的值为 nan 或 inf,则返回最内层维度的大小。默认值为 False,表示在 ``sorted_sequence`` 的查找给定 ``x`` 的下边界。
14+
- **right** (bool,可选) - 根据给定 ``x`` 在 ``sorted_sequence`` 查找对应的上边界或下边界。如果 ``sorted_sequence`` 的值为 nan 或 inf,则返回最内层维度的大小。默认值为 False,表示在 ``sorted_sequence`` 的查找给定 ``x`` 的下边界。
1515
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
1616

1717
返回

docs/api/paddle/gather_cn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ gather
4242
::::::::::::
4343
- **x** (Tensor) - 输入 Tensor,秩 ``rank >= 1``,支持的数据类型包括 int32、int64、float32、float64、complex64、complex128 和 uint8 (CPU)、float16(GPU) 。
4444
- **index** (Tensor) - 索引 Tensor,秩 ``rank = 0`` 或者 ``rank = 1``,数据类型为 int32 或 int64。
45-
- **axis** (Tensor) - 指定 index 获取输入的维度,``axis`` 的类型可以是 int 或者 Tensor,当 ``axis`` 为 Tensor 的时候其数据类型为 int32 或者 int64。默认值为 None,当``axis``为 None 的时候其值为 0。
45+
- **axis** (Tensor) - 指定 index 获取输入的维度,``axis`` 的类型可以是 int 或者 Tensor,当 ``axis`` 为 Tensor 的时候其数据类型为 int32 或者 int64。默认值为 None,当 ``axis`` 为 None 的时候其值为 0。
4646
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。
4747

4848
返回

0 commit comments

Comments
 (0)