(this issue is just for my personal self-learning ) imcomplete features of paddle.nn.initializer.TruncatedNormal (compared to torch.nn.init.trunc_normal_() ) #42609
Labels
PFCC
Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc
status/close
已关闭
type/feature-request
新需求申请
需求描述 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
The text was updated successfully, but these errors were encountered: