Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ Similarily = "Similarily"
Simle = "Simle"
Sovler = "Sovler"
Successed = "Successed"
classfy = "classfy"
corss = "corss"
creatation = "creatation"
creats = "creats"
dafault = "dafault"
datas = "datas"
decribe = "decribe"
Expand Down
2 changes: 1 addition & 1 deletion docs/design/motivation/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fQ = f(paddle.layer.data(input_name="Q"))

topology = paddle.layer.less_than(
paddle.layer.cross_entropy(fA, fQ),
paddle.layer.corss_entropy(fB, fQ))
paddle.layer.cross_entropy(fB, fQ))

# Derive parameters required in topology and create them in model.
parameters = paddle.parameters.create(topology)
Expand Down
4 changes: 2 additions & 2 deletions docs/design/others/simple_op_design.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ message OpProto {
To generate Python code automatically:

```python
def create_python_ops_creatation_functions():
def create_python_ops_creation_functions():
op_protos = paddle.framework.OpRegistry.get_all_op_proto()
for type_name in op_protos:
op_proto = op_protos[type_name]
Expand All @@ -77,7 +77,7 @@ def create_python_ops_creatation_functions():
__impl__.__doc__ = create_doc_string(op_proto)
globals()[type_name] = __impl__

create_python_ops_creatation_functions()
create_python_ops_creation_functions()
```

### Message from Python to C++
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guides/custom_device_docs/stream_api_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ C_Status (*create_stream)(const C_Device device, C_Stream* stream)

### Description

It creats a stream, which is used to execute asynchronous tasks within the framework. In the stream, tasks are done in order. When the device does not support asynchronous execution, the API is required to be implemented with an empty method.
It creates a stream, which is used to execute asynchronous tasks within the framework. In the stream, tasks are done in order. When the device does not support asynchronous execution, the API is required to be implemented with an empty method.

### Parameter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ A:有的,例如:
下面以 BERT 模型为例介绍转换的过程:

- 如果 PyTorch repo 中已经提供权重,那么可以直接下载并进行后续的转换。huggingface 的 transformers 中提供了大部分模型参数,使用模型权重名称`model_name_or_path`即可加载(如`bert-base-uncased`)。或者从 huggingface 官网直接下载:https://huggingface.co/bert-base-uncased/tree/main
- 如果没有提供,则可以基于 PyTorch 代码,随机生成一个初始化权重(定义完 model 以后,使用`torch.save()` API 保存模型权重),然后将生成的 PyTorch 权重 (`bert_sequence_classfy.pth`) 转换为飞桨模型权重。
- 如果没有提供,则可以基于 PyTorch 代码,随机生成一个初始化权重(定义完 model 以后,使用`torch.save()` API 保存模型权重),然后将生成的 PyTorch 权重 (`bert_sequence_classify.pth`) 转换为飞桨模型权重。

```python
from transformers import BertModel
Expand All @@ -366,7 +366,7 @@ PATH = './torch_weight.bin'
torch.save(hf_model.state_dict(), PATH)
```

然后将生成的 PyTorch 权重 (`bert_sequence_classfy.pth`) 转换为飞桨模型权重,转换代码如下(代码解释详见代码后的 FAQ)
然后将生成的 PyTorch 权重 (`bert_sequence_classify.pth`) 转换为飞桨模型权重,转换代码如下(代码解释详见代码后的 FAQ)

```python
def convert_pytorch_checkpoint_to_paddle(
Expand Down