-
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
[Typing][A-29] Add type annotations for paddle/nn/initializer/constant.py
#65095
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
想问下 from __future__ import annotations
from ...base.initializer import ConstantInitializer
class Constant(ConstantInitializer):
def __init__(self, value: float = ...) -> None: ... 我看这里是前者: |
None, |
def forward( | ||
self, | ||
var: paddle.Tensor, | ||
block: framework.Block | paddle.pir.Block | None = None, |
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.
block: framework.Block | paddle.pir.Block | None = None, | |
block: paddle.pir.Block | None = None, |
统一下吧,静态图逻辑里不暴露老 IR 的概念,动静统一逻辑里不暴露静态图的概念
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.
PR Category
User Experience
PR Types
Improvements
Description
类型标注:
Related links
@SigureMo @megemini