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

[Typing][B-59] Add type annotations for python/paddle/text/viterbi_decode.py #65919

Merged
merged 4 commits into from
Jul 13, 2024

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented Jul 10, 2024

PR Category

User Experience

PR Types

Improvements

Description

Copy link

paddle-bot bot commented Jul 10, 2024

你的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 the contributor External developers label Jul 10, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 10, 2024
Comment on lines 157 to 158
potentials: Tensor
lengths: Tensor
Copy link
Contributor

Choose a reason for hiding this comment

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

木有这两个参数吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

在forward里面用的,这里不用初始化吗?

Copy link
Member

Choose a reason for hiding this comment

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

这里从来就不是「初始化」,这里是表明该类的实例在初始化后会有哪些属性,以及相应的类型,初始化怎么可能不绑定值?而且初始化是对运行时有影响的,我们怎么可能允许在这个任务加「初始化」?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

看了m佬提供的#65660 (comment) ,明白了。

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 🐾

@SigureMo SigureMo merged commit b3ffb88 into PaddlePaddle:develop Jul 13, 2024
30 of 32 checks passed
lixcli pushed a commit to lixcli/Paddle that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants