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 @@ Optimzier = "Optimzier"
Setment = "Setment"
Simle = "Simle"
Sovler = "Sovler"
dimention = "dimention"
dimentions = "dimentions"
dirrectories = "dirrectories"
disucssion = "disucssion"
inferface = "inferface"
infor = "infor"
instert = "instert"
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 @@ -26,7 +26,7 @@ Some essential concepts that our API have to provide include:

As a summarization
of
[our disucssion](https://github.com/PaddlePaddle/Paddle/issues/1315),
[our discussion](https://github.com/PaddlePaddle/Paddle/issues/1315),
let us present two examples here:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ add_custom_command(TARGET ${PLUGIN_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}.so ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMENT "Creating plugin dirrectories------>>>"
COMMENT "Creating plugin directories------>>>"
)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python/.timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ add_custom_command(TARGET ${PLUGIN_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}.so ${CMAKE_CURRENT_BINARY_DIR}/python/paddle-plugins/
COMMENT "Creating plugin dirrectories------>>>"
COMMENT "Creating plugin directories------>>>"
)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python/.timestamp
Expand Down
12 changes: 6 additions & 6 deletions docs/guides/beginner/tensor_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Note that no copies happened while broadcasting.

In PaddlePaddle, tensors are broadcastable when following rulrs hold(ref [Numpy Broadcasting](https://numpy.org/doc/stable/user/basics.broadcasting.html#module-numpy.doc.broadcasting)):

1. there should be at least one dimention in each tensor
1. there should be at least one dimension in each tensor
2. when comparing their shapes element-wise from backward to forward, two dimensions are compatible when
they are equal, or one of them is 1, or one of them does not exist.

Expand All @@ -532,10 +532,10 @@ x = paddle.ones((2, 3, 1, 5))
y = paddle.ones((3, 4, 1))

# compare from backward to forward:
# 1st step:y's dimention is 1
# 2nd step:x's dimention is 1
# 3rd step:two dimentions are the same
# 4st step:y's dimention does not exist
# 1st step:y's dimension is 1
# 2nd step:x's dimension is 1
# 3rd step:two dimensions are the same
# 4st step:y's dimension does not exist
# So, x and y are broadcastable
z = x + y
print(z.shape)
Expand All @@ -544,7 +544,7 @@ print(z.shape)
# In Compare
x = paddle.ones((2, 3, 4))
y = paddle.ones((2, 3, 6))
# x and y are not broadcastable because in first step form tail, x's dimention 4 is not equal to y's dimention 6
# x and y are not broadcastable because in first step form tail, x's dimension 4 is not equal to y's dimension 6
# z = x, y
# ValueError: (InvalidArgument) Broadcast dimension mismatch.
```
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/beginner/tensor_index_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ Tensor(shape=[1, 2, 3, 4], dtype=int64, place=Place(cpu), stop_gradient=True,
[16, 17, 18, 19],
[20, 21, 22, 23]]]])

>>> b = a[:, [0,0,1], [1,2,0],:] # the new dimention is at axis 1
>>> b = a[:, [0,0,1], [1,2,0],:] # the new dimension is at axis 1
>>> b
Tensor(shape=[1, 3, 4], dtype=int64, place=Place(cpu), stop_gradient=True,
[[[4 , 5 , 6 , 7 ],
Expand All @@ -369,7 +369,7 @@ Tensor(shape=[1, 3], dtype=int64, place=Place(cpu), stop_gradient=True,
#### 场景 2-高级索引位置不相邻
当高级索引位置不相邻时,则`index`对应产生最终的输出结果会放到第一维上。
```python
>>> d = a[:, [1], :, [2,1,0]] # advanced indexes are not adjacent, the new dimention is at axis 0
>>> d = a[:, [1], :, [2,1,0]] # advanced indexes are not adjacent, the new dimension is at axis 0
>>> d
Tensor(shape=[3, 1, 3], dtype=int64, place=Place(cpu), stop_gradient=True,
[[[14, 18, 22]],
Expand Down