-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
Tensor(shape=[2, 2], dtype=float32, place=Place(cpu), stop_gradient=False, | ||
[[12. 18.] | ||
[17. 25.]] |
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.
[[12. 18.] | ||
[17. 25.]] |
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.
同上
[[10. 14.] | ||
[10. 14.]] |
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.
grad 应该也是 Tensor 吧?
>>> 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) |
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.
这个示例应该是写错了,没有用到 compute_fbank_matrix ~ 重新写一个吧 ~
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) |
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.
这... ... 方法改了,变量名字还是那个 ... ...
代码没啥问题~ 不过,doc 编译错误了~ @SigureMo 帮忙看看吧~ |
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.
…ddlePaddle#56296) * fix sample codes * fix bug * fix bug * fix bug
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码为新的格式,并通过 xdoctest 检查:
@sunzhongkai588 @SigureMo @megemini