Skip to content
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

[xdoctest] reformat example code with google style in No.16-No.20 #56296

Merged
merged 4 commits into from
Aug 18, 2023

Conversation

longranger2
Copy link
Contributor

PR types

Others

PR changes

Others

Description

修改如下文件的示例代码为新的格式,并通过 xdoctest 检查:

  • python/paddle/audio/features/layers.py
  • python/paddle/audio/functional/functional.py
  • python/paddle/audio/functional/window.py
  • python/paddle/autograd/autograd.py
  • python/paddle/autograd/backward_mode.py

@sunzhongkai588 @SigureMo @megemini

@paddle-bot
Copy link

paddle-bot bot commented Aug 15, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Aug 15, 2023
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 15, 2023
Comment on lines 59 to 61
Tensor(shape=[2, 2], dtype=float32, place=Place(cpu), stop_gradient=False,
[[12. 18.]
[17. 25.]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

应该少了逗号

Comment on lines 68 to 69
[[12. 18.]
[17. 25.]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Comment on lines 75 to 76
[[10. 14.]
[10. 14.]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grad 应该也是 Tensor 吧?

Comment on lines 214 to 218
>>> import paddle

n_mfcc = 23
n_mels = 51
paddle_dct = paddle.audio.functional.create_dct(n_mfcc, n_mels)
>>> n_mfcc = 23
>>> n_mels = 51
>>> paddle_dct = paddle.audio.functional.create_dct(n_mfcc, n_mels)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个示例应该是写错了,没有用到 compute_fbank_matrix ~ 重新写一个吧 ~

@longranger2
Copy link
Contributor Author

@megemini @SigureMo 修改好了~

paddle_dct = paddle.audio.functional.create_dct(n_mfcc, n_mels)
>>> sr = 23
>>> n_fft = 51
>>> paddle_dct = paddle.audio.functional.compute_fbank_matrix(sr, n_fft)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这... ... 方法改了,变量名字还是那个 ... ...

@longranger2
Copy link
Contributor Author

@megemini @SigureMo 修改好了,辛苦review下~

@megemini
Copy link
Contributor

代码没啥问题~ 不过,doc 编译错误了~ @SigureMo 帮忙看看吧~

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

代码没啥问题~ 不过,doc 编译错误了~ @SigureMo 帮忙看看吧~

这个先不用管,目前是不影响预览的

看了一周了,也没修好……

@luotao1 luotao1 merged commit 02538df into PaddlePaddle:develop Aug 18, 2023
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
@longranger2 longranger2 deleted the xdoctest4 branch September 13, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants