Skip to content

Commit ad86097

Browse files
authored
Fix typos (PaddlePaddle#1150)
1 parent d8102a2 commit ad86097

39 files changed

+74
-74
lines changed

docs/zh/examples/drivaernetplusplus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ export ep2=-----------------ID-----------------
345345

346346
17. 下载数据,将 PubDAS 中的 License.txt 从 ep1 数据源传送到 ep2(自己路径下,第 8,9 步设置)。
347347
``` sh
348-
# here is defaut path (your home path)
348+
# here is default path (your home path)
349349
globus transfer $ep1:License.txt $ep2:/~/License.txt
350350
Message: The transfer has been accepted and a task has been created and queued for execution
351351
Task ID: -----------------传送任务ID-----------------

docs/zh/examples/phygeonet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ T=3
214214
![image](https://paddle-org.bj.bcebos.com/paddlescience/docs/PhyGeoNet/heat_equation_bc_2.png)
215215

216216
T=6
217-
![iamge](https://paddle-org.bj.bcebos.com/paddlescience/docs/PhyGeoNet/heat_equation_bc_3.png)
217+
![image](https://paddle-org.bj.bcebos.com/paddlescience/docs/PhyGeoNet/heat_equation_bc_3.png)
218218

219219
## 6. 总结
220220

docs/zh/examples/tempoGAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ examples/tempoGAN/conf/tempogan.yaml:27:37
146146
--8<--
147147
```
148148

149-
注意到其中包含 3 个 bool 类型的变量 `use_amp``use_spatialdisc``use_tempodisc`,它们分别表示是否使用混合精度训练(AMP)、是否使用 Discriminator 和是否使用 Discriminator_tempo,当 `use_spatialdisc``use_tempodisc` 都被设置为 `False` 时,本问题的网络结构将会变为一个单纯的 Genrator 模型,不再是 GAN 网络了。
149+
注意到其中包含 3 个 bool 类型的变量 `use_amp``use_spatialdisc``use_tempodisc`,它们分别表示是否使用混合精度训练(AMP)、是否使用 Discriminator 和是否使用 Discriminator_tempo,当 `use_spatialdisc``use_tempodisc` 都被设置为 `False` 时,本问题的网络结构将会变为一个单纯的 Generator 模型,不再是 GAN 网络了。
150150

151151
同时需要指定训练轮数和学习率等超参数,注意由于 GAN 网络训练流程与一般单个模型的网络不同,`EPOCHS` 的设置也有所不同。
152152

examples/adr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
souce code will be available after code already orgnized in the near future.
1+
source code will be available after code already orgnized in the near future.

examples/moflow/optimize_moflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def load_property_csv(filepath, normalize=True):
7272

7373

7474
def smiles_to_adj(mol_smiles, data_name="qm9"):
75-
"""Use simles to adj, atoms
75+
"""Use smiles to adj, atoms
7676
7777
Args:
7878
mol_smiles: eg. CC(C)(C)c1ccc2occ(CC(=O)Nc3ccccc3F)c2c1

jointContribution/CFDGCN/mesh_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def delauney(x):
268268
face = np.array([[0, 1, 2]])
269269
else:
270270
raise ValueError(
271-
f"Not enough points to contruct Delaunay triangulation, got {pos.shape[0]} "
271+
f"Not enough points to construct Delaunay triangulation, got {pos.shape[0]} "
272272
+ "but expected at least 3"
273273
)
274274

jointContribution/PIRBN/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Inspired by findings, we proposed the PIRBN, which can exhibit the local propert
1313

1414
Numerical examples include:
1515

16-
- 1D sine funtion (**Eq. 13** in the manuscript)
16+
- 1D sine function (**Eq. 13** in the manuscript)
1717

1818
**PDE**: $\frac{\partial^2 }{\partial x^2}u(x)-4\mu^2\pi^2 sin(2\mu\pi(x))=0, x\in[0,1]$
1919

2020
**BC**: $u(0)=u(1)=0.$
2121

22-
- 1D sine funtion (**Eq. 15** in the manuscript)
22+
- 1D sine function (**Eq. 15** in the manuscript)
2323
**PDE**: $\frac{\partial^2 }{\partial x^2}u(x-100)-4\mu^2\pi^2 sin(2\mu\pi(x-100))=0, x\in[100,101]$
2424

2525
**BC**: $u(100)=u(101)=0.$
@@ -32,7 +32,7 @@ For more details in terms of mathematical proofs and numerical examples, please
3232

3333
<https://github.com/JinshuaiBai/PIRBN>
3434

35-
## Enviornmental settings
35+
## Environmental settings
3636

3737
``` shell
3838
pip install -r requirements.txt

jointContribution/PIRBN/jacobian_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def jacobian(y, x):
2424
J = paddle.zeros(J_shape)
2525
J_flat = flat(
2626
J, start_axis=0, stop_axis=len(y.shape) - 1
27-
) # partialy flatten as y_flat
27+
) # partially flatten as y_flat
2828
for i, y_i in enumerate(y):
29-
assert y_i.size == 1, f"y_i.size shoule be 1, but got {y_i.size}"
29+
assert y_i.size == 1, f"y_i.size should be 1, but got {y_i.size}"
3030
grad = paddle.grad(y_i, x, allow_unused=True)[
3131
0
3232
] # grad[i] == sum by j (dy[j] / dx[i])

jointContribution/PIRBN/rbn_net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Activation(paddle.nn.Layer):
133133
def __init__(self, n_neu, c, n_in, activation_function="gaussian"):
134134
super(Activation, self).__init__()
135135
self.activation_function = activation_function
136-
# PINN y = w2 * (tanh(w1 * x + b1)) + b2 w,b are trainable parameters, b is bais
136+
# PINN y = w2 * (tanh(w1 * x + b1)) + b2 w,b are trainable parameters, b is bias
137137
# PIRBN y = w * exp(b^2 * |x-c|^2) w,b are trainable parameters, c is constant, b is not bias
138138

139139
if self.activation_function == "gaussian":

jointContribution/graphcast/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_day_progress(
5050
point at which UNIX time starts).
5151
longitude: 1D array of longitudes at which day progress is computed.
5252
Returns:
53-
2D array of day progress values normalized to be in the [0, 1) inverval
53+
2D array of day progress values normalized to be in the [0, 1) interval
5454
for each time point at each longitude.
5555
"""
5656
# [0.0, 1.0) Interval.

ppsci/arch/afno.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def __init__(
165165
super().__init__()
166166
if hidden_size % num_blocks != 0:
167167
raise ValueError(
168-
f"hidden_size({hidden_size}) should be divisble by num_blocks({num_blocks})."
168+
f"hidden_size({hidden_size}) should be divisible by num_blocks({num_blocks})."
169169
)
170170

171171
self.hidden_size = hidden_size

ppsci/arch/cfdgcn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class CFDGCN(nn.Layer):
194194
config_file (str): Name of configuration file for su2 module.
195195
coarse_mesh (str): Path of coarse mesh file.
196196
fine_marker_dict (Dict[str, List[List[int]]]): Dict of fine marker.
197-
process_sim (Callable, optional): Preprocess funtion. Defaults to `lambda x, y: x`.
197+
process_sim (Callable, optional): Preprocess function. Defaults to `lambda x, y: x`.
198198
freeze_mesh (bool, optional): Whether set `stop_gradient=True` for nodes. Defaults to False.
199199
num_convs (int, optional): Number of conv layers. Defaults to 6.
200200
num_end_convs (int, optional): Number of end conv layers. Defaults to 3.

ppsci/arch/cuboid_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ class CuboidTransformer(base.Arch):
491491
gated_ffn (bool, optional): Whether to use gate FFN. Defaults to False.
492492
norm_layer (str, optional): The type of normilize. Defaults to "layer_norm".
493493
padding_type (str, optional): The type of padding. Defaults to "ignore".
494-
pos_embed_type (str, optional): The type of pos embeding. Defaults to "t+hw".
494+
pos_embed_type (str, optional): The type of pos embedding. Defaults to "t+hw".
495495
checkpoint_level (bool, optional): Whether to use checkpoint. Defaults to True.
496496
use_relative_pos (bool, optional): Whether to use relative pose. Defaults to True.
497497
self_attn_use_final_proj (bool, optional): Whether to use final projection. Defaults to True.

ppsci/arch/cuboid_transformer_decoder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414

1515
class PosEmbed(nn.Layer):
16-
"""Pose embeding
16+
"""Pose embedding
1717
1818
Args:
19-
embed_dim (int): The dimension of embeding.
20-
maxT (int): The embeding max time.
21-
maxH (int): The embeding max height.
22-
maxW (int): The embeding max width.
19+
embed_dim (int): The dimension of embedding.
20+
maxT (int): The embedding max time.
21+
maxH (int): The embedding max height.
22+
maxW (int): The embedding max width.
2323
typ (str):
2424
The type of the positional embedding.
2525
- t+h+w:
@@ -180,7 +180,7 @@ class CuboidCrossAttentionLayer(nn.Layer):
180180
The complexity of the layer is O((T2 / n_t * Bh * Bw) * (T1 / n_t * Bh * Bw) * n_t (H / Bh) (W / Bw)) = O(T2 * T1 / n_t H W Bh Bw)
181181
182182
Args:
183-
dim (int): The dimention of input tensor.
183+
dim (int): The dimension of input tensor.
184184
num_heads (int): The number of head.
185185
n_temporal (int, optional): The num of temporal. Defaults to 1.
186186
cuboid_hw (tuple, optional): The height and width of cuboid. Defaults to (7, 7).
@@ -880,7 +880,7 @@ class CuboidTransformerDecoder(nn.Layer):
880880
norm_layer (str, optional): The normalization layer. Defaults to "layer_norm".
881881
use_inter_ffn (bool, optional): Whether to use inter FFN. Defaults to False.
882882
hierarchical_pos_embed (bool, optional): Whether to use hierarchical pos_embed. Defaults to False.
883-
pos_embed_type (str, optional): The type of pos embeding. Defaults to "t+hw".
883+
pos_embed_type (str, optional): The type of pos embedding. Defaults to "t+hw".
884884
max_temporal_relative (int, optional): The max number of teemporal relative. Defaults to 50.
885885
padding_type (str, optional): The type of padding. Defaults to "ignore".
886886
checkpoint_level (bool, optional): Whether to enable gradient checkpointing. Defaults to True.

ppsci/arch/extformer_moe_cuboid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class ExtFormerMoECuboid(base.Arch):
496496
gated_ffn (bool, optional): Whether to use gate FFN. Defaults to False.
497497
norm_layer (str, optional): The type of normilize. Defaults to "layer_norm".
498498
padding_type (str, optional): The type of padding. Defaults to "ignore".
499-
pos_embed_type (str, optional): The type of pos embeding. Defaults to "t+hw".
499+
pos_embed_type (str, optional): The type of pos embedding. Defaults to "t+hw".
500500
checkpoint_level (bool, optional): Whether to use checkpoint. Defaults to True.
501501
use_relative_pos (bool, optional): Whether to use relative pose. Defaults to True.
502502
self_attn_use_final_proj (bool, optional): Whether to use final projection. Defaults to True.

ppsci/arch/extformer_moe_cuboid_decoder.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515

1616
class PosEmbed(nn.Layer):
17-
"""pose embeding
17+
"""pose embedding
1818
1919
Args:
20-
embed_dim (int): The dimension of embeding.
21-
maxT (int): The embeding max time.
22-
maxH (int): The embeding max height.
23-
maxW (int): The embeding max width.
20+
embed_dim (int): The dimension of embedding.
21+
maxT (int): The embedding max time.
22+
maxH (int): The embedding max height.
23+
maxW (int): The embedding max width.
2424
typ (str):
2525
The type of the positional embedding.
2626
- t+h+w:
@@ -189,7 +189,7 @@ class CuboidCrossAttentionLayer(nn.Layer):
189189
The complexity of the layer is O((T2 / n_t * Bh * Bw) * (T1 / n_t * Bh * Bw) * n_t (H / Bh) (W / Bw)) = O(T2 * T1 / n_t H W Bh Bw)
190190
191191
Args:
192-
dim (int): The dimention of input tensor.
192+
dim (int): The dimension of input tensor.
193193
num_heads (int): The number of head.
194194
n_temporal (int, optional): The num of temporal. Defaults to 1.
195195
cuboid_hw (tuple, optional): The height and width of cuboid. Defaults to (7, 7).
@@ -980,7 +980,7 @@ class CuboidTransformerDecoder(nn.Layer):
980980
norm_layer (str, optional): The normalization layer. Defaults to "layer_norm".
981981
use_inter_ffn (bool, optional): Whether to use inter FFN. Defaults to False.
982982
hierarchical_pos_embed (bool, optional): Whether to use hierarchical pos_embed. Defaults to False.
983-
pos_embed_type (str, optional): The type of pos embeding. Defaults to "t+hw".
983+
pos_embed_type (str, optional): The type of pos embedding. Defaults to "t+hw".
984984
max_temporal_relative (int, optional): The max number of teemporal relative. Defaults to 50.
985985
padding_type (str, optional): The type of padding. Defaults to "ignore".
986986
checkpoint_level (bool, optional): Whether to enable gradient checkpointing. Defaults to True.

ppsci/arch/fno_block.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def pad(self, x):
8787
# (so we must reverse the padding list)
8888
padding = padding[::-1]
8989

90-
# the F.pad(x, padding) funtion pads the tensor 'x' in reverse order of the "padding" list i.e. the last axis of tensor 'x' will be padded by the amount mention at the first position of the 'padding' vector. The details about F.pad can be found here:
90+
# the F.pad(x, padding) function pads the tensor 'x' in reverse order of the "padding" list i.e. the last axis of tensor 'x' will be padded by the amount mention at the first position of the 'padding' vector. The details about F.pad can be found here:
9191
# https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/pad_cn.html
9292

9393
if self.padding_mode == "symmetric":
@@ -249,7 +249,7 @@ def set_embedding(self, x):
249249
def forward(self, x):
250250
assert (
251251
self.embedding is not None
252-
), "AdaIN: update embeddding before running forward"
252+
), "AdaIN: update embedding before running forward"
253253

254254
weight, bias = paddle.split(
255255
self.mlp(self.embedding),
@@ -484,7 +484,7 @@ def resample(x, res_scale, axis, output_shape=None):
484484
else:
485485
res_scale = [res_scale] * len(axis)
486486
else:
487-
assert len(res_scale) == len(axis), "leght of res_scale and axis are not same"
487+
assert len(res_scale) == len(axis), "length of res_scale and axis are not same"
488488

489489
old_size = x.shape[-len(axis) :]
490490
if output_shape is None:

ppsci/arch/geofno.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def compl_mul1d(self, op1, op2_real, op2_imag):
6767

6868
def forward(self, x, output_size=None):
6969
batchsize = x.shape[0]
70-
# Compute Fourier coeffcients up to factor of e^(- something constant)
70+
# Compute Fourier coefficients up to factor of e^(- something constant)
7171
x_ft = paddle.fft.rfft(x)
7272

7373
# Multiply relevant Fourier modes

ppsci/arch/ifm_mlp.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class IFMMLP(base.Arch):
4444
embed_name (str): Embed name used in arch, such as "IMF", "None".
4545
inputs (int): Input dim.
4646
outputs (int): Output dim.
47-
d_out (int): Embedding output dim for some architechture.
48-
sigma (float): Hyper parameter for some architechture.
47+
d_out (int): Embedding output dim for some architecture.
48+
sigma (float): Hyper parameter for some architecture.
4949
dp_ratio (float): Dropout ratio.
5050
reg (bool): Regularization flag.
5151
first_omega_0 (float): Frequency factor used in first layer.
@@ -319,8 +319,8 @@ class GM_DNN(nn.Layer):
319319
inputs (int): Input dim.
320320
hidden_units (List[int]): Units num in hidden layers.
321321
outputs (int): Output dim.
322-
d_out (int): Embedding output dim for some architechture.
323-
sigma (float): Hyper parameter for some architechture.
322+
d_out (int): Embedding output dim for some architecture.
323+
sigma (float): Hyper parameter for some architecture.
324324
dp_ratio (float): Dropout ratio.
325325
reg (bool): Regularization flag.
326326
"""
@@ -498,8 +498,8 @@ class SIM_DNN(nn.Layer):
498498
inputs (int): Input dim.
499499
hidden_units (List[int]): Units num in hidden layers.
500500
outputs (int): Output dim.
501-
d_out (int): Embedding output dim for some architechture.
502-
sigma (float): Hyper parameter for some architechture.
501+
d_out (int): Embedding output dim for some architecture.
502+
sigma (float): Hyper parameter for some architecture.
503503
dp_ratio (float): Dropout ratio.
504504
reg (bool): Regularization flag.
505505
"""

ppsci/arch/mlp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class MLP(base.Arch):
151151
input_dim (Optional[int]): Number of input's dimension. Defaults to None.
152152
output_dim (Optional[int]): Number of output's dimension. Defaults to None.
153153
periods (Optional[Dict[int, Tuple[float, bool]]]): Period of each input key,
154-
input in given channel will be period embeded if specified, each tuple of
154+
input in given channel will be period embedded if specified, each tuple of
155155
periods list is [period, trainable]. Defaults to None.
156156
fourier (Optional[Dict[str, Union[float, int]]]): Random fourier feature embedding,
157157
e.g. {'dim': 256, 'scale': 1.0}. Defaults to None.
@@ -220,7 +220,7 @@ def __init__(
220220
# initialize FC layer(s)
221221
cur_size = len(self.input_keys) if input_dim is None else input_dim
222222
if input_dim is None and periods:
223-
# period embeded channel(s) will be doubled automatically
223+
# period embedded channel(s) will be doubled automatically
224224
# if input_dim is not specified
225225
cur_size += len(periods)
226226

@@ -384,7 +384,7 @@ def __init__(
384384
# initialize FC layer(s)
385385
cur_size = len(self.input_keys) if input_dim is None else input_dim
386386
if input_dim is None and periods:
387-
# period embeded channel(s) will be doubled automatically
387+
# period embedded channel(s) will be doubled automatically
388388
# if input_dim is not specified
389389
cur_size += len(periods)
390390

@@ -653,7 +653,7 @@ class PirateNet(base.Arch):
653653
input_dim (Optional[int]): Number of input's dimension. Defaults to None.
654654
output_dim (Optional[int]): Number of output's dimension. Defaults to None.
655655
periods (Optional[Dict[int, Tuple[float, bool]]]): Period of each input key,
656-
input in given channel will be period embeded if specified, each tuple of
656+
input in given channel will be period embedded if specified, each tuple of
657657
periods list is [period, trainable]. Defaults to None.
658658
fourier (Optional[Dict[str, Union[float, int]]]): Random fourier feature embedding,
659659
e.g. {'dim': 256, 'scale': 1.0}. Defaults to None.
@@ -712,7 +712,7 @@ def __init__(
712712
# initialize FC layer(s)
713713
cur_size = len(self.input_keys) if input_dim is None else input_dim
714714
if input_dim is None and periods:
715-
# period embeded channel(s) will be doubled automatically
715+
# period embedded channel(s) will be doubled automatically
716716
# if input_dim is not specified
717717
cur_size += len(periods)
718718

ppsci/arch/sfnonet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ class SFNONet(base.Arch):
408408
Defaults to None.
409409
non_linearity (nn.functional, optional): Non-Linearity module to use. Defaults to F.gelu.
410410
norm (str, optional): Normalization layer to use. Defaults to None.
411-
ada_in_features (int,optional): The input channles of the adaptive normalization.Defaults to None.
411+
ada_in_features (int,optional): The input channels of the adaptive normalization.Defaults to None.
412412
preactivation (bool, optional): Whether to use resnet-style preactivation. Defaults to False.
413413
fno_skip (str, optional): Type of skip connection to use,{'linear', 'identity', 'soft-gating'}.
414414
Defaults to "soft-gating".

ppsci/arch/tfnonet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FNONet(base.Arch):
3131
Defaults to None.
3232
non_linearity (nn.functional, optional): Non-Linearity module to use. Defaults to F.gelu.
3333
norm (str, optional): Normalization layer to use. Defaults to None.
34-
ada_in_features (int,optional): The input channles of the adaptive normalization.Defaults to None.s
34+
ada_in_features (int,optional): The input channels of the adaptive normalization.Defaults to None.s
3535
preactivation (bool, optional): Whether to use resnet-style preactivation. Defaults to False.
3636
skip (str, optional): Type of skip connection to use,{'linear', 'identity', 'soft-gating'}.
3737
Defaults to "soft-gating".

ppsci/arch/unonet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class UNONet(base.Arch):
4545
Defaults to None.
4646
non_linearity (nn.functional, optional): Non-Linearity module to use. Defaults to F.gelu.
4747
norm (str, optional): Normalization layer to use. Defaults to None.
48-
ada_in_features (Optional[int],optional): The input channles of the adaptive normalization.Defaults to
48+
ada_in_features (Optional[int],optional): The input channels of the adaptive normalization.Defaults to
4949
None.
5050
preactivation (bool, optional): Whether to use resnet-style preactivation. Defaults to False.
5151
fno_skip (str, optional): Type of skip connection to use for fno_block. Defaults to "linear".
@@ -162,7 +162,7 @@ def __init__(
162162
# example, if n_layers = 5, then 4:0, 3:1
163163
self.horizontal_skips_map[n_layers - i - 1] = i
164164
# self.uno_scalings may be a 1d list specifying uniform scaling factor at each layer
165-
# or a 2d list, where each row specifies scaling factors along each dimention.
165+
# or a 2d list, where each row specifies scaling factors along each dimension.
166166
# To get the final (end to end) scaling factors we need to multiply
167167
# the scaling factors (a list) of all layer.
168168

0 commit comments

Comments
 (0)