Skip to content

Commit 397066d

Browse files
authored
映射文档 No.6 (PaddlePaddle#5757)
* add md file * fix * fix * fix error
1 parent 6b0ff15 commit 397066d

File tree

10 files changed

+180
-0
lines changed

10 files changed

+180
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 仅 Paddle 参数更多 ] torch.Tensor.count_nonzero
2+
3+
### [torch.Tensor.count_nonzero](https://pytorch.org/docs/stable/generated/torch.Tensor.count_nonzero.html?highlight=count_non#torch.Tensor.count_nonzero)
4+
5+
```python
6+
torch.Tensor.count_nonzero(dim=None)
7+
```
8+
9+
### [paddle.Tensor.count_nonzero](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#count-nonzero-axis-none-keepdim-false-name-none)
10+
11+
```python
12+
paddle.Tensor.count_nonzero(axis=None, keepdim=False, name=None)
13+
```
14+
15+
两者功能一致,仅 paddle 参数更多,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|---------|--------------| ----------------------------------------------------- |
19+
| dim | axis | 指定对 x 进行计算的轴,仅参数名不一致。 |
20+
| - | keepdim | 是否在输出 Tensor 中保留减小的维度,PyTorch 无此参数, Paddle 保持默认即可。 |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ] torch.Tensor.acosh
2+
3+
### [torch.Tensor.acosh](https://pytorch.org/docs/stable/generated/torch.Tensor.acosh.html?highlight=acosh#torch.Tensor.acosh)
4+
5+
```python
6+
torch.Tensor.acosh()
7+
```
8+
9+
### [paddle.Tensor.acosh]()
10+
11+
```python
12+
paddle.Tensor.acosh(name=None)
13+
```
14+
15+
两者功能完全一致,无参数。
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 仅参数名不一致 ] torch.Tensor.chunk
2+
3+
### [torch.Tensor.chunk](https://pytorch.org/docs/stable/generated/torch.Tensor.chunk.html?highlight=chunk#torch.Tensor.chunk)
4+
5+
```python
6+
torch.Tensor.chunk(chunks, dim=0)
7+
```
8+
9+
### [paddle.Tensor.chunk](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#chunk-chunks-axis-0-name-none)
10+
11+
```python
12+
paddle.Tensor.chunk(chunks, axis=0, name=None)
13+
```
14+
15+
两者功能一致,仅参数名不一致,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|------------| ------------ | ------------------------------------------------------ |
19+
| chunks | chunks | 表示将输入 Tensor 划分成多少个相同大小的子 Tensor。 |
20+
| dim | axis | 表示需要分割的维度,仅参数名不一致。 |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 参数完全一致 ] torch.Tensor.clamp
2+
3+
### [torch.Tensor.clamp](https://pytorch.org/docs/stable/generated/torch.Tensor.clamp.html?highlight=clamp#torch.Tensor.clamp)
4+
5+
```python
6+
torch.Tensor.clamp(min=None, max=None)
7+
```
8+
9+
### [paddle.Tensor.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#clip-min-none-max-none-name-none)
10+
11+
```python
12+
paddle.Tensor.clip(min=None, max=None, name=None)
13+
```
14+
15+
两者功能一致,参数完全一致,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|---------|--------------| -------------------------------------------------- |
19+
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 |
20+
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 参数完全一致 ] torch.Tensor.clamp_
2+
3+
### [torch.Tensor.clamp_](https://pytorch.org/docs/stable/generated/torch.Tensor.clamp_.html?highlight=clamp_#torch.Tensor.clamp_)
4+
5+
```python
6+
torch.Tensor.clamp_(min=None, max=None)
7+
```
8+
9+
### [paddle.Tensor.clip_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id6)
10+
11+
```python
12+
paddle.Tensor.clip_(min=None, max=None, name=None)
13+
```
14+
15+
两者功能一致,参数完全一致,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|---------|--------------|---------------------------|
19+
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 |
20+
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 参数完全一致 ] torch.Tensor.clip
2+
3+
### [torch.Tensor.clip](https://pytorch.org/docs/stable/generated/torch.Tensor.clip.html?highlight=clip#torch.Tensor.clip)
4+
5+
```python
6+
torch.Tensor.clip(min=None, max=None)
7+
```
8+
9+
### [paddle.Tensor.clip](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#clip-min-none-max-none-name-none)
10+
11+
```python
12+
paddle.Tensor.clip(min=None, max=None, name=None)
13+
```
14+
15+
两者功能一致,参数完全一致,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|---------|--------------| -------------------------------------------------- |
19+
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 |
20+
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## [ 参数完全一致 ] torch.Tensor.clip_
2+
3+
### [torch.Tensor.clip_](https://pytorch.org/docs/stable/generated/torch.Tensor.clip_.html?highlight=clip_#torch.Tensor.clip_)
4+
5+
```python
6+
torch.Tensor.clip_(min=None, max=None)
7+
```
8+
9+
### [paddle.Tensor.clip_](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#id6)
10+
11+
```python
12+
paddle.Tensor.clip_(min=None, max=None, name=None)
13+
```
14+
15+
两者功能一致,参数完全一致,具体如下:
16+
### 参数映射
17+
| PyTorch | PaddlePaddle | 备注 |
18+
|---------|--------------|---------------------------|
19+
| min | min | 裁剪的最小值,输入中小于该值的元素将由该元素代替。 |
20+
| max | max | 裁剪的最大值,输入中大于该值的元素将由该元素代替。 |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ] torch.Tensor.conj
2+
3+
### [torch.Tensor.conj](https://pytorch.org/docs/stable/generated/torch.Tensor.conj.html?highlight=conj#torch.Tensor.conj)
4+
5+
```python
6+
torch.Tensor.conj()
7+
```
8+
9+
### [paddle.Tensor.conj](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#conj-name-none)
10+
11+
```python
12+
paddle.Tensor.conj(name=None)
13+
```
14+
15+
两者功能完全一致,无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ] torch.Tensor.cos
2+
3+
### [torch.Tensor.cos](https://pytorch.org/docs/stable/generated/torch.Tensor.cos.html?highlight=cos#torch.Tensor.cos)
4+
5+
```python
6+
torch.Tensor.cos()
7+
```
8+
9+
### [paddle.Tensor.cos](paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#cos-name-none)
10+
11+
```python
12+
paddle.Tensor.cos(name=None)
13+
```
14+
15+
两者功能完全一致,无参数。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## [ 无参数 ] torch.Tensor.cosh
2+
3+
### [torch.Tensor.cosh](https://pytorch.org/docs/stable/generated/torch.Tensor.cosh.html?highlight=cosh#torch.Tensor.cosh)
4+
5+
```python
6+
torch.Tensor.cosh()
7+
```
8+
9+
### [paddle.Tensor.cosh](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/Tensor_cn.html#cosh-name-none)
10+
11+
```python
12+
paddle.Tensor.cosh(name=None)
13+
```
14+
15+
两者功能完全一致,无参数。

0 commit comments

Comments
 (0)