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

(this issue is just for my personal self-learning ) imcomplete features of paddle.nn.initializer.TruncatedNormal (compared to torch.nn.init.trunc_normal_() ) #42609

Closed
OccupyMars2025 opened this issue May 9, 2022 · 2 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/feature-request 新需求申请

Comments

@OccupyMars2025
Copy link
Contributor

OccupyMars2025 commented May 9, 2022

需求描述 Feature Description

objectives: complete the features of paddle.nn.initializer.TruncatedNormal
(compared to torch.nn.init.trunc_normal_() )

requirement scenarios:
in pytorch, If I want to create a parameter, I will do the following:
self.pos_embed = nn.Parameter(torch.zeros(1, num_patches, embed_dim)) trunc_normal_(self.pos_embed, std=.02)
while in paddlepaddle, if I want to do the same thing, I will do the following:
`
self.pos_embed = self.create_parameter(shape=[1, num_patches, embed_dim],
is_bias=False,
default_initializer=paddle.nn.initializer.TruncatedNormal(std=0.02))

`
but I found that paddle.nn.initializer.TruncatedNormal doesn't have lower and upper cutoff values
in its init method

替代实现 Alternatives

No response

@paddle-bot-old
Copy link

paddle-bot-old bot commented May 9, 2022

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@gongel
Copy link
Member

gongel commented May 9, 2022

Thank you for your attention. We are evaluating it internally and please look forward to it. At the same time, you can also implement it yourself through hacking.

@OccupyMars2025 OccupyMars2025 changed the title imcomplete features of paddle.nn.initializer.TruncatedNormal (compared to torch.nn.init.trunc_normal_() ) (this issue is just for my personal self-learning ) imcomplete features of paddle.nn.initializer.TruncatedNormal (compared to torch.nn.init.trunc_normal_() ) Jun 20, 2022
@paddle-bot-old paddle-bot-old bot added status/close 已关闭 and removed status/new-issue 新建 labels Jun 25, 2022
@luotao1 luotao1 added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/close 已关闭 type/feature-request 新需求申请
Projects
None yet
Development

No branches or pull requests

4 participants