-
Notifications
You must be signed in to change notification settings - Fork 875
add window func doc #7631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zty-king
wants to merge
4
commits into
PaddlePaddle:develop
Choose a base branch
from
zty-king:window_api
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+147
−0
Open
add window func doc #7631
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| .. _cn_api_paddle_bartlett_window: | ||
|
|
||
| bartlett_window | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.bartlett_window( | ||
| window_length: int, | ||
| periodic: bool = True, | ||
| *, | ||
| dtype: str = 'float32', | ||
| layout: str | None = None, | ||
| device: PlaceLike | None = None, | ||
| pin_memory: bool = False, | ||
| requires_grad: bool = False, | ||
| ) | ||
|
|
||
| 计算一个 Bartlett 窗。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **window_length** (int): 返回窗口的长度。必须为正数。 | ||
| - **periodic** (bool, 可选): 如果为 True,返回一个周期性的窗口;如果为 False,返回一个对称性的窗口。默认值为 True。 | ||
| - **dtype** (str, 可选): 返回的 Tensor 的数据类型。默认值为 'float32'。 | ||
| - **layout** (str, 可选): 仅用于 API 一致性,Paddle 中忽略。默认值为 None。 | ||
| - **device** (PlaceLike|None, 可选): 返回的 Tensor 所在的设备。如果为 None,则使用当前默认设备(参考 paddle.device.set_device())。对于 CPU Tensor,设备为 CPU;对于 CUDA Tensor,设备为当前 CUDA 设备。默认值为 None。 | ||
| - **pin_memory** (bool, 可选): 如果设置为 True,返回的 Tensor 将被分配在固定内存(pinned memory)中。仅对 CPU Tensor 生效。默认值为 False。 | ||
| - **requires_grad** (bool, 可选): 是否在 autograd 中记录返回 Tensor 的操作。默认值为 False。 | ||
|
|
||
|
|
||
| 返回 | ||
| ::::::::: | ||
|
|
||
| ``paddle.Tensor``,一维张量,大小为 `(window_length,)`,表示 Bartlett 窗口。 | ||
|
|
||
| 代码示例 | ||
| ::::::::: | ||
|
|
||
| COPY-FROM: paddle.bartlett_window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| .. _cn_api_paddle_blackman_window: | ||
|
|
||
| blackman_window | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.blackman_window( | ||
| window_length: int, | ||
| periodic: bool = True, | ||
| *, | ||
| dtype: str = 'float32', | ||
| layout: str | None = None, | ||
| device: PlaceLike | None = None, | ||
| pin_memory: bool = False, | ||
| requires_grad: bool = False, | ||
| ) | ||
|
|
||
| 计算一个 Blackman 窗。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **window_length** (int): 返回窗口的长度。必须为正数。 | ||
| - **periodic** (bool, 可选): 如果为 True,返回一个周期性的窗口;如果为 False,返回一个对称性的窗口。默认值为 True。 | ||
| - **dtype** (str, 可选): 返回的 Tensor 的数据类型。默认值为 'float32'。 | ||
| - **layout** (str, 可选): 仅用于 API 一致性,Paddle 中忽略。默认值为 None。 | ||
| - **device** (PlaceLike|None, 可选): 返回的 Tensor 所在的设备。如果为 None,则使用当前默认设备(参考 paddle.device.set_device())。对于 CPU Tensor,设备为 CPU;对于 CUDA Tensor,设备为当前 CUDA 设备。默认值为 None。 | ||
| - **pin_memory** (bool, 可选): 如果设置为 True,返回的 Tensor 将被分配在固定内存(pinned memory)中。仅对 CPU Tensor 生效。默认值为 False。 | ||
| - **requires_grad** (bool, 可选): 是否在 autograd 中记录返回 Tensor 的操作。默认值为 False。 | ||
|
|
||
|
|
||
| 返回 | ||
| ::::::::: | ||
|
|
||
| ``paddle.Tensor``,一维张量,大小为 `(window_length,)`,表示 Blackman 窗口。 | ||
|
|
||
| 代码示例 | ||
| ::::::::: | ||
|
|
||
| COPY-FROM: paddle.blackman_window | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| .. _cn_api_paddle_hamming_window: | ||
|
|
||
| hamming_window | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.hamming_window( | ||
| window_length: int, | ||
| periodic: bool = True, | ||
| alpha: float = 0.54, | ||
| beta: float = 0.46, | ||
| *, | ||
| dtype: str = 'float32', | ||
| layout: str | None = None, | ||
| device: PlaceLike | None = None, | ||
| pin_memory: bool = False, | ||
| requires_grad: bool = False, | ||
| ) | ||
|
|
||
| 计算一个广义的汉明窗。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **window_length** (int): 返回窗口的长度。必须为正数。 | ||
| - **periodic** (bool, 可选): 如果为 True,返回一个周期性的窗口;如果为 False,返回一个对称性的窗口。默认值为 True。 | ||
| - **alpha** (float, 可选): 窗口系数 α。默认值为 0.54。 | ||
| - **beta** (float, 可选): 窗口系数 β。默认值为 0.46。 | ||
| - **dtype** (str, 可选): 返回的 Tensor 的数据类型。默认值为 'float32'。 | ||
| - **layout** (str, 可选): 仅用于 API 一致性,Paddle 中忽略。默认值为 None。 | ||
| - **device** (PlaceLike|None, 可选): 返回的 Tensor 所在的设备。如果为 None,则使用当前默认设备(参考 paddle.device.set_device())。对于 CPU Tensor,设备为 CPU;对于 CUDA Tensor,设备为当前 CUDA 设备。默认值为 None。 | ||
| - **pin_memory** (bool, 可选): 如果设置为 True,返回的 Tensor 将被分配在固定内存(pinned memory)中。仅对 CPU Tensor 生效。默认值为 False。 | ||
| - **requires_grad** (bool, 可选): 是否在 autograd 中记录返回 Tensor 的操作。默认值为 False。 | ||
| 返回 | ||
| ::::::::: | ||
|
|
||
| ``paddle.Tensor``,一维张量,大小为 `(window_length,)`,表示 Hamming 窗口。 | ||
|
|
||
| 代码示例 | ||
| ::::::::: | ||
|
|
||
| COPY-FROM: paddle.hamming_window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| .. _cn_api_paddle_hann_window: | ||
|
|
||
| hann_window | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.hann_window( | ||
| window_length: int, | ||
| periodic: bool = True, | ||
| *, | ||
| dtype: str = 'float32', | ||
| layout: str | None = None, | ||
| device: PlaceLike | None = None, | ||
| pin_memory: bool = False, | ||
| requires_grad: bool = False, | ||
| ) | ||
|
|
||
| 计算一个 Hann 窗。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **window_length** (int): 返回窗口的长度。必须为正数。 | ||
| - **periodic** (bool, 可选): 如果为 True,返回一个周期性的窗口;如果为 False,返回一个对称性的窗口。默认值为 True。 | ||
| - **dtype** (str, 可选): 返回的 Tensor 的数据类型。默认值为 'float32'。 | ||
| - **layout** (str, 可选): 仅用于 API 一致性,Paddle 中忽略。默认值为 None。 | ||
| - **device** (PlaceLike|None, 可选): 返回的 Tensor 所在的设备。如果为 None,则使用当前默认设备(参考 paddle.device.set_device())。对于 CPU Tensor,设备为 CPU;对于 CUDA Tensor,设备为当前 CUDA 设备。默认值为 None。 | ||
| - **pin_memory** (bool, 可选): 如果设置为 True,返回的 Tensor 将被分配在固定内存(pinned memory)中。仅对 CPU Tensor 生效。默认值为 False。 | ||
| - **requires_grad** (bool, 可选): 是否在 autograd 中记录返回 Tensor 的操作。默认值为 False。 | ||
|
|
||
|
|
||
| 返回 | ||
| ::::::::: | ||
|
|
||
| ``paddle.Tensor``,一维张量,大小为 `(window_length,)`,表示 Hann 窗口。 | ||
|
|
||
| 代码示例 | ||
| ::::::::: | ||
|
|
||
| COPY-FROM: paddle.hann_window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| .. _cn_api_paddle_kaiser_window: | ||
|
|
||
| kaiser_window | ||
| ------------------------------- | ||
|
|
||
| .. py:function:: paddle.kaiser_window( | ||
| window_length: int, | ||
| periodic: bool = True, | ||
| beta: float = 12.0, | ||
| *, | ||
| dtype: str = 'float32', | ||
| layout: str | None = None, | ||
| device: PlaceLike | None = None, | ||
| pin_memory: bool = False, | ||
| requires_grad: bool = False, | ||
| ) | ||
|
|
||
| 计算一个 Kaiser 窗。 | ||
|
|
||
| 参数 | ||
| :::::::::::: | ||
| - **window_length** (int): 返回窗口的长度。必须为正数。 | ||
| - **periodic** (bool, 可选): 如果为 True,返回一个周期性的窗口;如果为 False,返回一个对称性的窗口。默认值为 True。 | ||
| - **beta** (float, 可选): 窗口的形状参数。默认值为 12.0。 | ||
| - **dtype** (str, 可选): 返回的 Tensor 的数据类型。默认值为 'float32'。 | ||
| - **layout** (str, 可选): 仅用于 API 一致性,Paddle 中忽略。默认值为 None。 | ||
| - **device** (PlaceLike|None, 可选): 返回的 Tensor 所在的设备。如果为 None,则使用当前默认设备(参考 paddle.device.set_device())。对于 CPU Tensor,设备为 CPU;对于 CUDA Tensor,设备为当前 CUDA 设备。默认值为 None。 | ||
| - **pin_memory** (bool, 可选): 如果设置为 True,返回的 Tensor 将被分配在固定内存(pinned memory)中。仅对 CPU Tensor 生效。默认值为 False。 | ||
| - **requires_grad** (bool, 可选): 是否在 autograd 中记录返回 Tensor 的操作。默认值为 False。 | ||
|
|
||
|
|
||
| 返回 | ||
| ::::::::: | ||
|
|
||
| ``paddle.Tensor``,一维张量,大小为 `(window_length,)`,表示 Kaiser 窗口。 | ||
|
|
||
| 代码示例 | ||
| ::::::::: | ||
|
|
||
| COPY-FROM: paddle.kaiser_window |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不用写参数类型,参考 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/api_contributing_guides/api_docs_guidelines_cn.html#id3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done