当前位置:网站首页>TRUNC in pytorch_ normal_ principle

TRUNC in pytorch_ normal_ principle

2022-06-11 08:11:00 Interval

This is not something new and magical , It's simple , as follows :

 Insert picture description here
To put it bluntly, we use the normal distribution to generate a point , If this point is [a,b] Out of range , Then regenerate , Until in the interval .

stay pytorch in , Default parameters , for example a,b as follows :

nn.init.trunc_normal_(
    tensor: torch.Tensor,
    mean: float = 0.0,
    std: float = 1.0,
    a: float = -2.0,
    b: float = 2.0,
) -> torch.Tensor


with values outside [a, b], redraw until they are within the bounds.
原网站

版权声明
本文为[Interval]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020514399640.html