From 98e86d3faa7fcc4a31a2819e4eb4e925f6bd45fe Mon Sep 17 00:00:00 2001 From: enkilee Date: Wed, 18 Sep 2024 17:17:57 +0800 Subject: [PATCH 01/13] fix --- .../torch.signal.windows.blackman.md | 46 ++++++++++++++++++ .../functional/torch.signal.windows.cosine.md | 46 ++++++++++++++++++ .../torch.signal.windows.exponential.md | 48 +++++++++++++++++++ .../torch.signal.windows.gaussian.md | 47 ++++++++++++++++++ .../torch.signal.windows.general_cosine.md | 47 ++++++++++++++++++ .../torch.signal.windows.general_hamming.md | 47 ++++++++++++++++++ .../torch.signal.windows.hamming.md | 46 ++++++++++++++++++ .../functional/torch.signal.windows.hann.md | 46 ++++++++++++++++++ 8 files changed, 373 insertions(+) create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md create mode 100644 docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md new file mode 100644 index 00000000000..573724edb19 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -0,0 +1,46 @@ +## [ torch 参数更多 ]torch.signal.windows.blackman +### [torch.signal.windows.blackman](https://pytorch.org/docs/stable/generated/torch.signal.windows.blackman.html) + +```python +torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._blackman]() + +```python +paddle.audio.functional._blackman(M: int, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.blackman(5, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._blackman(5) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.blackman(5, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._blackman(5) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md new file mode 100644 index 00000000000..0436e07b038 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -0,0 +1,46 @@ +## [ torch 参数更多 ]torch.signal.windows.cosine +### [torch.signal.windows.cosine](https://pytorch.org/docs/stable/generated/torch.signal.windows.cosine.html) + +```python +torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._cosine]() + +```python +paddle.audio.functional._cosine(M: int, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.cosine(5, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._cosine(5) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.cosine(5, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._cosine(5) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md new file mode 100644 index 00000000000..594c0e5f4b0 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -0,0 +1,48 @@ +## [ torch 参数更多 ]torch.signal.windows.exponential +### [torch.signal.windows.exponential](https://pytorch.org/docs/stable/generated/torch.signal.windows.exponential.html) + +```python +torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._exponential]() + +```python +paddle.audio.functional._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| center | center | 窗口的中心位置。 | +| tau | tau | 窗口的半衰期。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.exponential(10, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._exponential(10) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.exponential(10, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._exponential(10) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md new file mode 100644 index 00000000000..ea5a77f63b8 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -0,0 +1,47 @@ +## [ torch 参数更多 ]torch.signal.windows.gaussian +### [torch.signal.windows.gaussian](https://pytorch.org/docs/stable/generated/torch.signal.windows.gaussian.html) + +```python +torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._gaussian]() + +```python +paddle.audio.functional._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| std | std | 高斯的标准差,Pytorch默认值为1.0。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.gaussian(10, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._gaussian(10) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.gaussian(10, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._gaussian(10) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md new file mode 100644 index 00000000000..c886816e2fd --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -0,0 +1,47 @@ +## [ torch 参数更多 ]torch.signal.windows.general_cosine +### [torch.signal.windows.general_cosine](https://pytorch.org/docs/stable/generated/torch.signal.windows.general_cosine.html) + +```python +torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional.__general_cosine]() + +```python +paddle.audio.functional._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| a | a | 与每个余弦函数相关的系数。Pytorch为Iterable, Paddle为float。| +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._general_cosine(10, 1.0) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._general_cosine(10, 1.0) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md new file mode 100644 index 00000000000..68709c5c5f8 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -0,0 +1,47 @@ +## [ torch 参数更多 ]torch.signal.windows.general_hamming +### [torch.signal.windows.general_hamming](https://pytorch.org/docs/stable/generated/torch.signal.windows.general_hamming.html) + +```python +torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._general_hamming]() + +```python +paddle.audio.functional._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| alpha | alpha | 窗口系数,Pytorch 默认值为0.54。| +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.general_hamming(10, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._general_hamming(10, 0.5) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.general_hamming(10, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._general_hamming(10, 0.5) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md new file mode 100644 index 00000000000..0a6d6eafcf4 --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -0,0 +1,46 @@ +## [ torch 参数更多 ]torch.signal.windows.hamming +### [torch.signal.windows.hamming](https://pytorch.org/docs/stable/generated/torch.signal.windows.hamming.html) + +```python +torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._hamming]() + +```python +paddle.audio.functional._hamming(M: int, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.hamming(10, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._hamming(10) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.hamming(10, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._hamming(10) +y.cpu() +``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md new file mode 100644 index 00000000000..e2a97ff844b --- /dev/null +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -0,0 +1,46 @@ +## [ torch 参数更多 ]torch.signal.windows.hann +### [torch.signal.windows.hann](https://pytorch.org/docs/stable/generated/torch.signal.windows.hann.html) + +```python +torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) +``` + +### [paddle.audio.functional._hann]() + +```python +paddle.audio.functional._hann(M: int, sym: bool = True, dtype: str = 'float64') +``` + +PyTorch 相比 Paddle 支持更多其他参数,具体如下: +### 参数映射 + +| PyTorch | PaddlePaddle | 备注 | +| ------------- | ------------ | ------------------------------------------------------ | +| M | M | 输入窗口的长度。 | +| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| dtype | dtype | 返回 Tensor 的数据类型。 | +| layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | +| device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | +| requires_grad | - | 表示是否计算梯度, Paddle 无此参数,需要转写。 | + +### 转写示例 + +#### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 +```python +# PyTorch 写法 +torch.signal.windows.hann(10, requires_grad=True) + +# Paddle 写法 +x = paddle.audio.functional._hann(10) +x.stop_gradient = False +``` + +#### device: Tensor 的设备 +```python +# PyTorch 写法 +torch.signal.windows.hann(10, device=torch.device('cpu')) + +# Paddle 写法 +y = paddle.audio.functional._hann(10) +y.cpu() +``` From 24fa85ffea38de5cbaaea98e77cb4ef28d6abfe1 Mon Sep 17 00:00:00 2001 From: enkilee Date: Thu, 19 Sep 2024 10:43:32 +0800 Subject: [PATCH 02/13] fix --- .../audio/functional/torch.signal.windows.gaussian.md | 6 +++--- .../audio/functional/torch.signal.windows.general_cosine.md | 6 +++--- .../functional/torch.signal.windows.general_hamming.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index ea5a77f63b8..1507b2d9a7e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -17,7 +17,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | M | M | 输入窗口的长度。 | -| std | std | 高斯的标准差,Pytorch默认值为1.0。 | +| std | std | 高斯的标准差,Pytorch 默认值为1.0, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。 | | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.gaussian(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._gaussian(10) +x = paddle.audio.functional._gaussian(10, 1.0) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.gaussian(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._gaussian(10) +y = paddle.audio.functional._gaussian(10, 1.0) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index c886816e2fd..8e5867ee182 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -17,7 +17,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | M | M | 输入窗口的长度。 | -| a | a | 与每个余弦函数相关的系数。Pytorch为Iterable, Paddle为float。| +| a | a | 与每个余弦函数相关的系数。| | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._general_cosine(10, 1.0) +x = paddle.audio.functional._general_cosine(10, a=[0.46, 0.23, 0.31]) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._general_cosine(10, 1.0) +y = paddle.audio.functional._general_cosine(10, a=[0.46, 0.23, 0.31]) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 68709c5c5f8..b052fc7b320 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -17,7 +17,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | M | M | 输入窗口的长度。 | -| alpha | alpha | 窗口系数,Pytorch 默认值为0.54。| +| alpha | alpha | 窗口系数,Pytorch 默认值为0.54, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。| | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_hamming(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._general_hamming(10, 0.5) +x = paddle.audio.functional._general_hamming(10, 0.54) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.general_hamming(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._general_hamming(10, 0.5) +y = paddle.audio.functional._general_hamming(10, 0.54) y.cpu() ``` From b1ded2f3b95d9345575046f8e83ef864df8accb9 Mon Sep 17 00:00:00 2001 From: enkilee Date: Thu, 19 Sep 2024 11:04:19 +0800 Subject: [PATCH 03/13] fix --- .../audio/functional/torch.signal.windows.general_cosine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index 8e5867ee182..9ced5050e0c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -5,7 +5,7 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.__general_cosine]() +### [paddle.audio.functional._general_cosine]() ```python paddle.audio.functional._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') From 3df1adb44bc0327e3338011c8d997d5258cad40b Mon Sep 17 00:00:00 2001 From: enkilee Date: Thu, 19 Sep 2024 11:55:31 +0800 Subject: [PATCH 04/13] code style --- .../audio/functional/torch.signal.windows.gaussian.md | 2 +- .../audio/functional/torch.signal.windows.general_hamming.md | 2 +- .../audio/functional/torch.signal.windows.hann.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 1507b2d9a7e..a4bf3ca074c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -17,7 +17,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | M | M | 输入窗口的长度。 | -| std | std | 高斯的标准差,Pytorch 默认值为1.0, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。 | +| std | std | 高斯的标准差,Pytorch 默认值为 1.0, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。 | | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index b052fc7b320..569c2f36528 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -17,7 +17,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | M | M | 输入窗口的长度。 | -| alpha | alpha | 窗口系数,Pytorch 默认值为0.54, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。| +| alpha | alpha | 窗口系数,Pytorch 默认值为 0.54, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。| | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index e2a97ff844b..66778a5ce8f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -16,7 +16,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | +| M | M | 输入窗口的长度。 | | sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | From e4d3de2f9199082ad0b30703afc8417d5a85c5fa Mon Sep 17 00:00:00 2001 From: enkilee Date: Thu, 19 Sep 2024 17:22:37 +0800 Subject: [PATCH 05/13] add .window. --- .../audio/functional/torch.signal.windows.blackman.md | 8 ++++---- .../audio/functional/torch.signal.windows.cosine.md | 8 ++++---- .../audio/functional/torch.signal.windows.exponential.md | 8 ++++---- .../audio/functional/torch.signal.windows.gaussian.md | 8 ++++---- .../functional/torch.signal.windows.general_cosine.md | 6 +++--- .../functional/torch.signal.windows.general_hamming.md | 8 ++++---- .../audio/functional/torch.signal.windows.hamming.md | 8 ++++---- .../audio/functional/torch.signal.windows.hann.md | 8 ++++---- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index 573724edb19..1c553887a9b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -5,10 +5,10 @@ torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._blackman]() +### [paddle.audio.functional.window._blackman]() ```python -paddle.audio.functional._blackman(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._blackman(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -31,7 +31,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.blackman(5, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._blackman(5) +x = paddle.audio.functional.window._blackman(5) x.stop_gradient = False ``` @@ -41,6 +41,6 @@ x.stop_gradient = False torch.signal.windows.blackman(5, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._blackman(5) +y = paddle.audio.functional.window._blackman(5) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 0436e07b038..13c666afecd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -5,10 +5,10 @@ torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._cosine]() +### [paddle.audio.functional.window._cosine]() ```python -paddle.audio.functional._cosine(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._cosine(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -31,7 +31,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.cosine(5, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._cosine(5) +x = paddle.audio.functional.window._cosine(5) x.stop_gradient = False ``` @@ -41,6 +41,6 @@ x.stop_gradient = False torch.signal.windows.cosine(5, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._cosine(5) +y = paddle.audio.functional.window._cosine(5) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 594c0e5f4b0..359a6aaa633 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -5,10 +5,10 @@ torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._exponential]() +### [paddle.audio.functional.window._exponential]() ```python -paddle.audio.functional._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -33,7 +33,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.exponential(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._exponential(10) +x = paddle.audio.functional.window._exponential(10) x.stop_gradient = False ``` @@ -43,6 +43,6 @@ x.stop_gradient = False torch.signal.windows.exponential(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._exponential(10) +y = paddle.audio.functional.window._exponential(10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index a4bf3ca074c..4e5a063883e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -5,10 +5,10 @@ torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._gaussian]() +### [paddle.audio.functional.window._gaussian]() ```python -paddle.audio.functional._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.gaussian(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._gaussian(10, 1.0) +x = paddle.audio.functional.window._gaussian(10, 1.0) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.gaussian(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._gaussian(10, 1.0) +y = paddle.audio.functional.window._gaussian(10, 1.0) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index 9ced5050e0c..fe2ce6a661c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -8,7 +8,7 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch. ### [paddle.audio.functional._general_cosine]() ```python -paddle.audio.functional._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._general_cosine(10, a=[0.46, 0.23, 0.31]) +x = paddle.audio.functional.window._general_cosine(10, a=[0.46, 0.23, 0.31]) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._general_cosine(10, a=[0.46, 0.23, 0.31]) +y = paddle.audio.functional.window._general_cosine(10, a=[0.46, 0.23, 0.31]) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 569c2f36528..0b31b8ad013 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -5,10 +5,10 @@ torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._general_hamming]() +### [paddle.audio.functional.window._general_hamming]() ```python -paddle.audio.functional._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -32,7 +32,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_hamming(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._general_hamming(10, 0.54) +x = paddle.audio.functional.window._general_hamming(10, 0.54) x.stop_gradient = False ``` @@ -42,6 +42,6 @@ x.stop_gradient = False torch.signal.windows.general_hamming(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._general_hamming(10, 0.54) +y = paddle.audio.functional.window._general_hamming(10, 0.54) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index 0a6d6eafcf4..19fbbd8ed10 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -5,10 +5,10 @@ torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._hamming]() +### [paddle.audio.functional.window._hamming]() ```python -paddle.audio.functional._hamming(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._hamming(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -31,7 +31,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.hamming(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._hamming(10) +x = paddle.audio.functional.window._hamming(10) x.stop_gradient = False ``` @@ -41,6 +41,6 @@ x.stop_gradient = False torch.signal.windows.hamming(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._hamming(10) +y = paddle.audio.functional.window._hamming(10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 66778a5ce8f..5b9cd03b3b8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -5,10 +5,10 @@ torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._hann]() +### [paddle.audio.functional.window._hann]() ```python -paddle.audio.functional._hann(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.window._hann(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: @@ -31,7 +31,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.hann(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional._hann(10) +x = paddle.audio.functional.window._hann(10) x.stop_gradient = False ``` @@ -41,6 +41,6 @@ x.stop_gradient = False torch.signal.windows.hann(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional._hann(10) +y = paddle.audio.functional.window._hann(10) y.cpu() ``` From d709b3b5610aeab0acda15c89ac0eb0109d2dc37 Mon Sep 17 00:00:00 2001 From: enkilee Date: Fri, 20 Sep 2024 08:40:44 +0800 Subject: [PATCH 06/13] fix --- .../audio/functional/torch.signal.windows.general_cosine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index fe2ce6a661c..9b18a66540d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -5,7 +5,7 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional._general_cosine]() +### [paddle.audio.functional.window._general_cosine]() ```python paddle.audio.functional.window._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') From e9b943fd87362d7d051849f0a3834804e9a8e141 Mon Sep 17 00:00:00 2001 From: enkilee Date: Mon, 23 Sep 2024 17:21:09 +0800 Subject: [PATCH 07/13] fix --- .../audio/functional/torch.signal.windows.blackman.md | 4 ++-- .../audio/functional/torch.signal.windows.cosine.md | 4 ++-- .../audio/functional/torch.signal.windows.exponential.md | 4 ++-- .../audio/functional/torch.signal.windows.gaussian.md | 4 ++-- .../audio/functional/torch.signal.windows.general_cosine.md | 4 ++-- .../audio/functional/torch.signal.windows.general_hamming.md | 4 ++-- .../audio/functional/torch.signal.windows.hamming.md | 4 ++-- .../audio/functional/torch.signal.windows.hann.md | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index 1c553887a9b..da06c437791 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -5,10 +5,10 @@ torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._blackman]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._blackman(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 13c666afecd..00f0fca5043 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -5,10 +5,10 @@ torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._cosine]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._cosine(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 359a6aaa633..3117900fe25 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -5,10 +5,10 @@ torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._exponential]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 4e5a063883e..09c361115dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -5,10 +5,10 @@ torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._gaussian]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index 9b18a66540d..de0725350c2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -5,10 +5,10 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._general_cosine]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 0b31b8ad013..05f7f1b3f60 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -5,10 +5,10 @@ torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._general_hamming]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index 19fbbd8ed10..ff49d9121bb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -5,10 +5,10 @@ torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._hamming]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._hamming(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 5b9cd03b3b8..24f4857af50 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -5,10 +5,10 @@ torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, device=None, requires_grad=False) ``` -### [paddle.audio.functional.window._hann]() +### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._hann(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: From c910c1ef2881390a44b0287a23fcf0c294d4dfba Mon Sep 17 00:00:00 2001 From: enkilee Date: Mon, 23 Sep 2024 17:25:48 +0800 Subject: [PATCH 08/13] fix --- .../audio/functional/torch.signal.windows.blackman.md | 2 +- .../audio/functional/torch.signal.windows.cosine.md | 2 +- .../audio/functional/torch.signal.windows.exponential.md | 2 +- .../audio/functional/torch.signal.windows.gaussian.md | 2 +- .../audio/functional/torch.signal.windows.general_cosine.md | 2 +- .../audio/functional/torch.signal.windows.general_hamming.md | 2 +- .../audio/functional/torch.signal.windows.hamming.md | 2 +- .../audio/functional/torch.signal.windows.hann.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index da06c437791..967117640c5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -8,7 +8,7 @@ torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._blackman(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 00f0fca5043..4734e5d758e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -8,7 +8,7 @@ torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, de ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._cosine(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 3117900fe25..30b48f6cf5b 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -8,7 +8,7 @@ torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=Non ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 09c361115dc..6ca51c9e8c0 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -8,7 +8,7 @@ torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch. ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index de0725350c2..467892dfb9c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -8,7 +8,7 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch. ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 05f7f1b3f60..8f9cfcbad5c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -8,7 +8,7 @@ torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, lay ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index ff49d9121bb..41bef4e66d5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -8,7 +8,7 @@ torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, d ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._hamming(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 24f4857af50..47174e9e61f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -8,7 +8,7 @@ torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, devi ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') +paddle.audio.functional.window._hann(M: int, sym: bool = True, dtype: str = 'float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: From 25c9c44b6d0a7600a1146db77c0c0c3595cbd760 Mon Sep 17 00:00:00 2001 From: enkilee Date: Tue, 24 Sep 2024 17:24:33 +0800 Subject: [PATCH 09/13] fix --- .../audio/functional/torch.signal.windows.blackman.md | 2 +- .../audio/functional/torch.signal.windows.cosine.md | 2 +- .../audio/functional/torch.signal.windows.exponential.md | 2 +- .../audio/functional/torch.signal.windows.gaussian.md | 2 +- .../audio/functional/torch.signal.windows.general_cosine.md | 2 +- .../audio/functional/torch.signal.windows.general_hamming.md | 2 +- .../audio/functional/torch.signal.windows.hamming.md | 2 +- .../audio/functional/torch.signal.windows.hann.md | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index 967117640c5..da06c437791 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -8,7 +8,7 @@ torch.signal.windows.blackman(M, *, sym=True, dtype=None, layout=torch.strided, ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._blackman(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 4734e5d758e..00f0fca5043 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -8,7 +8,7 @@ torch.signal.windows.cosine(M, *, sym=True, dtype=None, layout=torch.strided, de ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._cosine(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 30b48f6cf5b..3117900fe25 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -8,7 +8,7 @@ torch.signal.windows.exponential(M, *, center=None, tau=1.0, sym=True, dtype=Non ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._exponential(M: int, center=None, tau=1.0, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 6ca51c9e8c0..09c361115dc 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -8,7 +8,7 @@ torch.signal.windows.gaussian(M, *, std=1.0, sym=True, dtype=None, layout=torch. ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._gaussian(M: int, std: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index 467892dfb9c..de0725350c2 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -8,7 +8,7 @@ torch.signal.windows.general_cosine(M, *, a, sym=True, dtype=None, layout=torch. ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._general_cosine(M: int, a: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 8f9cfcbad5c..05f7f1b3f60 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -8,7 +8,7 @@ torch.signal.windows.general_hamming(M, *, alpha=0.54, sym=True, dtype=None, lay ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._general_hamming(M: int, alpha: float, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index 41bef4e66d5..ff49d9121bb 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -8,7 +8,7 @@ torch.signal.windows.hamming(M, *, sym=True, dtype=None, layout=torch.strided, d ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._hamming(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 47174e9e61f..24f4857af50 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -8,7 +8,7 @@ torch.signal.windows.hann(M, *, sym=True, dtype=None, layout=torch.strided, devi ### [paddle.audio.functional.get_window](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.6/api/paddle/audio/functional/get_window_cn.html#get-window) ```python -paddle.audio.functional.window._hann(M: int, sym: bool = True, dtype: str = 'float64') +paddle.audio.functional.get_window(window, win_length, fftbins=True, dtype='float64') ``` PyTorch 相比 Paddle 支持更多其他参数,具体如下: From 2f04f16cf86518369db3fd950c213a3fa20ffd52 Mon Sep 17 00:00:00 2001 From: enkilee Date: Wed, 25 Sep 2024 13:05:39 +0800 Subject: [PATCH 10/13] fix --- .../torch.signal.windows.blackman.md | 16 +++++++-- .../functional/torch.signal.windows.cosine.md | 18 +++++++--- .../torch.signal.windows.exponential.md | 22 +++++++++---- .../torch.signal.windows.gaussian.md | 33 ++++++++++++++++--- .../torch.signal.windows.general_cosine.md | 33 ++++++++++++++++--- .../torch.signal.windows.general_hamming.md | 33 ++++++++++++++++--- .../torch.signal.windows.hamming.md | 18 +++++++--- .../functional/torch.signal.windows.hann.md | 18 +++++++--- 8 files changed, 155 insertions(+), 36 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index da06c437791..c54dae9ea6c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -16,8 +16,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `blackman`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -25,13 +26,22 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.blackman(5) + +# Paddle 写法 +paddle.audio.functional.get_window('blackman', 5) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.blackman(5, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._blackman(5) +x = paddle.audio.functional.get_window('blackman', 5) x.stop_gradient = False ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 00f0fca5043..9aa2be4b49d 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -16,8 +16,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `cosine`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -25,13 +26,22 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.cosine(5) + +# Paddle 写法 +paddle.audio.functional.get_window('cosine', 5) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.cosine(5, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._cosine(5) +x = paddle.audio.functional.get_window('cosine', 5) x.stop_gradient = False ``` @@ -41,6 +51,6 @@ x.stop_gradient = False torch.signal.windows.cosine(5, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._cosine(5) +y = paddle.audio.functional.get_window('cosine', 5) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 3117900fe25..922658556b7 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -16,10 +16,11 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| center | center | 窗口的中心位置。 | -| tau | tau | 窗口的半衰期。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `exponential`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| center | - | 窗口的中心位置,Paddle 无此参数,暂无转写方式。 | +| tau | - | 窗口的半衰期,Paddle 无此参数,暂无转写方式。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -27,13 +28,22 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.exponential(10) + +# Paddle 写法 +paddle.audio.functional.get_window('exponential', 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.exponential(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._exponential(10) +x = paddle.audio.functional.get_window('exponential', 10) x.stop_gradient = False ``` @@ -43,6 +53,6 @@ x.stop_gradient = False torch.signal.windows.exponential(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._exponential(10) +y = paddle.audio.functional.get_window('exponential', 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 09c361115dc..5a7f6cddde8 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -16,9 +16,10 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| std | std | 高斯的标准差,Pytorch 默认值为 1.0, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `gaussian`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| std | - | 高斯的标准差,Pytorch 默认值为 1.0, Paddle 无此参数,需要转写。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -26,13 +27,34 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.c(10) + +# Paddle 写法 +std=1.0 +paddle.audio.functional.get_window(('gaussian',std), 10) +``` + +#### std:高斯的标准差 +```python +# PyTorch 写法 +torch.signal.windows.c(10, std=2.0) + +# Paddle 写法 +std=2.0 +paddle.audio.functional.get_window(('gaussian',std), 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.gaussian(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._gaussian(10, 1.0) +std=1.0 +x = paddle.audio.functional.get_window(('gaussian',std), 10) x.stop_gradient = False ``` @@ -42,6 +64,7 @@ x.stop_gradient = False torch.signal.windows.gaussian(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._gaussian(10, 1.0) +std=1.0 +y = paddle.audio.functional.get_window(('gaussian',std), 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index de0725350c2..1eb5b69722f 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -16,9 +16,10 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| a | a | 与每个余弦函数相关的系数。| -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_cosine`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| a | - | 与每个余弦函数相关的系数。Paddle 无此参数,需要转写。| +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -26,13 +27,34 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31]) + +# Paddle 写法 +a=[0.46, 0.23, 0.31] +paddle.audio.functional.get_window(('general_cosine',a), 10) +``` + +#### a:余弦函数相关的系数 +```python +# PyTorch 写法 +torch.signal.windows.general_cosine(10, a=[0.1, 0.2, 0.3]) + +# Paddle 写法 +a = [0.1, 0.2, 0.3] +paddle.audio.functional.get_window(('general_cosine',a), 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._general_cosine(10, a=[0.46, 0.23, 0.31]) +a = [0.46, 0.23, 0.31] +x = paddle.audio.functional.get_window(('general_cosine',a), 10) x.stop_gradient = False ``` @@ -42,6 +64,7 @@ x.stop_gradient = False torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._general_cosine(10, a=[0.46, 0.23, 0.31]) +a = [0.46, 0.23, 0.31] +y = paddle.audio.functional.get_window(('general_cosine',a), 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index 05f7f1b3f60..b8cf5ad6f16 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -16,9 +16,10 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| alpha | alpha | 窗口系数,Pytorch 默认值为 0.54, Paddle 无默认值,Paddle 需保持与 PyTorch 一致。| -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_hamming`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| alpha | - | 窗口系数,Pytorch 默认值为 0.54, Paddle 无默认值,需要转写。| +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -26,13 +27,34 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.general_hamming(10) + +# Paddle 写法 +a=0.54 +paddle.audio.functional.get_window(('general_hamming',a), 10) +``` + +#### alpha:窗口系数 +```python +# PyTorch 写法 +torch.signal.windows.general_hamming(10, 0.6) + +# Paddle 写法 +a = 0.6 +paddle.audio.functional.get_window(('general_hamming',a), 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.general_hamming(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._general_hamming(10, 0.54) +a = 0.54 +x = paddle.audio.functional.get_window(('general_hamming',a), 10) x.stop_gradient = False ``` @@ -42,6 +64,7 @@ x.stop_gradient = False torch.signal.windows.general_hamming(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._general_hamming(10, 0.54) +a = 0.54 +y = paddle.audio.functional.get_window(('general_hamming',a), 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index ff49d9121bb..88e97ba444e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -16,8 +16,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hamming`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -25,13 +26,22 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.hamming(10) + +# Paddle 写法 +paddle.audio.functional.get_window('hamming', 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.hamming(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._hamming(10) +x = paddle.audio.functional.get_window('hamming', 10) x.stop_gradient = False ``` @@ -41,6 +51,6 @@ x.stop_gradient = False torch.signal.windows.hamming(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._hamming(10) +y = paddle.audio.functional.get_window('hamming', 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 24f4857af50..71c0d192048 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -16,8 +16,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | -| M | M | 输入窗口的长度。 | -| sym | sym | 判断是否返回适用于过滤器设计的对称窗口。 | +| - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hann`。 | +| M | win_length | 输入窗口的长度,也是采样点数。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -25,13 +26,22 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: ### 转写示例 +#### window:窗函数类型 +```python +# PyTorch 写法 +torch.signal.windows.hann(10) + +# Paddle 写法 +paddle.audio.functional.get_window('hann', 10) +``` + #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 ```python # PyTorch 写法 torch.signal.windows.hann(10, requires_grad=True) # Paddle 写法 -x = paddle.audio.functional.window._hann(10) +x = paddle.audio.functional.get_window('hann', 10) x.stop_gradient = False ``` @@ -41,6 +51,6 @@ x.stop_gradient = False torch.signal.windows.hann(10, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._hann(10) +y = paddle.audio.functional.get_window('hann', 10) y.cpu() ``` From c0453aae3d19d30f4ffa51f29ae2759eae2bf2dc Mon Sep 17 00:00:00 2001 From: enkilee Date: Wed, 25 Sep 2024 15:48:04 +0800 Subject: [PATCH 11/13] fix --- .../audio/functional/torch.signal.windows.gaussian.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 5a7f6cddde8..aaf069c17e4 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -30,7 +30,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: #### window:窗函数类型 ```python # PyTorch 写法 -torch.signal.windows.c(10) +torch.signal.windows.gaussian(10) # Paddle 写法 std=1.0 @@ -40,7 +40,7 @@ paddle.audio.functional.get_window(('gaussian',std), 10) #### std:高斯的标准差 ```python # PyTorch 写法 -torch.signal.windows.c(10, std=2.0) +torch.signal.windows.gaussian(10, std=2.0) # Paddle 写法 std=2.0 From 9da9451483da5605fd7650ccf97e004ca1b43d08 Mon Sep 17 00:00:00 2001 From: enkilee Date: Wed, 25 Sep 2024 16:34:47 +0800 Subject: [PATCH 12/13] fix --- .../functional/torch.signal.windows.gaussian.md | 12 ++++-------- .../torch.signal.windows.general_cosine.md | 12 ++++-------- .../torch.signal.windows.general_hamming.md | 14 +++++--------- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index aaf069c17e4..52faf239acd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -33,8 +33,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.gaussian(10) # Paddle 写法 -std=1.0 -paddle.audio.functional.get_window(('gaussian',std), 10) +paddle.audio.functional.get_window(('gaussian', 1.0), 10) ``` #### std:高斯的标准差 @@ -43,8 +42,7 @@ paddle.audio.functional.get_window(('gaussian',std), 10) torch.signal.windows.gaussian(10, std=2.0) # Paddle 写法 -std=2.0 -paddle.audio.functional.get_window(('gaussian',std), 10) +paddle.audio.functional.get_window(('gaussian', 2.0), 10) ``` #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 @@ -53,8 +51,7 @@ paddle.audio.functional.get_window(('gaussian',std), 10) torch.signal.windows.gaussian(10, requires_grad=True) # Paddle 写法 -std=1.0 -x = paddle.audio.functional.get_window(('gaussian',std), 10) +x = paddle.audio.functional.get_window(('gaussian', 1.0), 10) x.stop_gradient = False ``` @@ -64,7 +61,6 @@ x.stop_gradient = False torch.signal.windows.gaussian(10, device=torch.device('cpu')) # Paddle 写法 -std=1.0 -y = paddle.audio.functional.get_window(('gaussian',std), 10) +y = paddle.audio.functional.get_window(('gaussian', 1.0), 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index 1eb5b69722f..c232cee0a3e 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -33,8 +33,7 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31]) # Paddle 写法 -a=[0.46, 0.23, 0.31] -paddle.audio.functional.get_window(('general_cosine',a), 10) +paddle.audio.functional.get_window(('general_cosine', [0.46, 0.23, 0.31]), 10) ``` #### a:余弦函数相关的系数 @@ -43,8 +42,7 @@ paddle.audio.functional.get_window(('general_cosine',a), 10) torch.signal.windows.general_cosine(10, a=[0.1, 0.2, 0.3]) # Paddle 写法 -a = [0.1, 0.2, 0.3] -paddle.audio.functional.get_window(('general_cosine',a), 10) +paddle.audio.functional.get_window(('general_cosine', [0.1, 0.2, 0.3]), 10) ``` #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 @@ -53,8 +51,7 @@ paddle.audio.functional.get_window(('general_cosine',a), 10) torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], requires_grad=True) # Paddle 写法 -a = [0.46, 0.23, 0.31] -x = paddle.audio.functional.get_window(('general_cosine',a), 10) +x = paddle.audio.functional.get_window(('general_cosine', [0.46, 0.23, 0.31]), 10) x.stop_gradient = False ``` @@ -64,7 +61,6 @@ x.stop_gradient = False torch.signal.windows.general_cosine(10, a=[0.46, 0.23, 0.31], device=torch.device('cpu')) # Paddle 写法 -a = [0.46, 0.23, 0.31] -y = paddle.audio.functional.get_window(('general_cosine',a), 10) +y = paddle.audio.functional.get_window(('general_cosine', [0.46, 0.23, 0.31]), 10) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index b8cf5ad6f16..a2d4dd3139c 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -33,18 +33,16 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: torch.signal.windows.general_hamming(10) # Paddle 写法 -a=0.54 -paddle.audio.functional.get_window(('general_hamming',a), 10) +paddle.audio.functional.get_window(('general_hamming', 0.54), 10) ``` #### alpha:窗口系数 ```python # PyTorch 写法 -torch.signal.windows.general_hamming(10, 0.6) +torch.signal.windows.general_hamming(10, alpha = 0.6) # Paddle 写法 -a = 0.6 -paddle.audio.functional.get_window(('general_hamming',a), 10) +paddle.audio.functional.get_window(('general_hamming', 0.6), 10) ``` #### requires_grad:是否需要求反向梯度,需要修改该 Tensor 的 stop_gradient 属性 @@ -53,8 +51,7 @@ paddle.audio.functional.get_window(('general_hamming',a), 10) torch.signal.windows.general_hamming(10, requires_grad=True) # Paddle 写法 -a = 0.54 -x = paddle.audio.functional.get_window(('general_hamming',a), 10) +x = paddle.audio.functional.get_window(('general_hamming', 0.54), 10) x.stop_gradient = False ``` @@ -64,7 +61,6 @@ x.stop_gradient = False torch.signal.windows.general_hamming(10, device=torch.device('cpu')) # Paddle 写法 -a = 0.54 -y = paddle.audio.functional.get_window(('general_hamming',a), 10) +y = paddle.audio.functional.get_window(('general_hamming', 0.54), 10) y.cpu() ``` From cb58f3b17dc32f926d61f57fa664f63572212f0a Mon Sep 17 00:00:00 2001 From: enkilee Date: Fri, 27 Sep 2024 15:44:12 +0800 Subject: [PATCH 13/13] fix --- .../audio/functional/torch.signal.windows.blackman.md | 6 +++--- .../audio/functional/torch.signal.windows.cosine.md | 4 ++-- .../audio/functional/torch.signal.windows.exponential.md | 4 ++-- .../audio/functional/torch.signal.windows.gaussian.md | 4 ++-- .../audio/functional/torch.signal.windows.general_cosine.md | 4 ++-- .../functional/torch.signal.windows.general_hamming.md | 4 ++-- .../audio/functional/torch.signal.windows.hamming.md | 4 ++-- .../audio/functional/torch.signal.windows.hann.md | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md index c54dae9ea6c..9b8f3d74fdd 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.blackman.md @@ -17,8 +17,8 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `blackman`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | @@ -51,6 +51,6 @@ x.stop_gradient = False torch.signal.windows.blackman(5, device=torch.device('cpu')) # Paddle 写法 -y = paddle.audio.functional.window._blackman(5) +y = paddle.audio.functional.get_window('blackman', 5) y.cpu() ``` diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md index 9aa2be4b49d..58539d29396 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.cosine.md @@ -17,8 +17,8 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `cosine`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md index 922658556b7..8cb920884f5 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.exponential.md @@ -17,8 +17,8 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `exponential`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | center | - | 窗口的中心位置,Paddle 无此参数,暂无转写方式。 | | tau | - | 窗口的半衰期,Paddle 无此参数,暂无转写方式。 | | dtype | dtype | 返回 Tensor 的数据类型。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md index 52faf239acd..25d71030578 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.gaussian.md @@ -17,9 +17,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `gaussian`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | | std | - | 高斯的标准差,Pytorch 默认值为 1.0, Paddle 无此参数,需要转写。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | -| 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md index c232cee0a3e..f69c9e1e8ff 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_cosine.md @@ -17,9 +17,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_cosine`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | | a | - | 与每个余弦函数相关的系数。Paddle 无此参数,需要转写。| -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md index a2d4dd3139c..f68fd7e8124 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.general_hamming.md @@ -17,9 +17,9 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `general_hamming`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | | alpha | - | 窗口系数,Pytorch 默认值为 0.54, Paddle 无默认值,需要转写。| -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md index 88e97ba444e..24738158eac 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hamming.md @@ -17,8 +17,8 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hamming`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 | diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md index 71c0d192048..059558bc4f3 100644 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md +++ b/docs/guides/model_convert/convert_from_pytorch/api_difference/audio/functional/torch.signal.windows.hann.md @@ -17,8 +17,8 @@ PyTorch 相比 Paddle 支持更多其他参数,具体如下: | PyTorch | PaddlePaddle | 备注 | | ------------- | ------------ | ------------------------------------------------------ | | - | window | 窗函数类型,Pytorch 无此参数,Paddle 需设置为 `hann`。 | -| M | win_length | 输入窗口的长度,也是采样点数。 | -| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口。 | +| M | win_length | 输入窗口的长度,也是采样点数,仅参数名不一致。 | +| sym | fftbins | 判断是否返回适用于过滤器设计的对称窗口,仅参数名不一致。 | | dtype | dtype | 返回 Tensor 的数据类型。 | | layout | - | 表示布局方式, Paddle 无此参数,一般对网络训练结果影响不大,可直接删除。 | | device | - | 表示 Tensor 存放设备位置,Paddle 无此参数,需要转写。 |