[Pytorch] How to Apply the Weight Initialization (Code)
2020. 12. 17. 18:01ㆍ분석 Python/Pytorch
728x90
def weights_init(m):
classname = m.__class__.__name__
if classname.find("Conv") != -1:
nn.init.normal_(m.weight.data, 0.0, 0.02)
elif classname.find("BatchNorm") != -1:
nn.init.normal_(m.weight.data, 1.0, 0.02)
nn.init.constant_(m.bias.data, 0)
netD.apply(weights_init)
docs.ray.io/en/master/tune/tutorials/tune-advanced-tutorial.html
Guide to Population Based Training (PBT) — Ray v1.2.0.dev0
PBT starts by training many neural networks in parallel with random hyperparameters, using information from the rest of the population to refine these hyperparameters and allocate resources to promising models. Let’s walk through how to use this algorith
docs.ray.io
728x90
'분석 Python > Pytorch' 카테고리의 다른 글
PyGAD + Pytorch + Skorch+ torch jit (0) | 2021.01.30 |
---|---|
[Pytorch] Error : Leaf variable has been moved into the graph interior 해결 방법 공유 (0) | 2021.01.16 |
[Pytorch] torch 유용한 함수 정리하기 (0) | 2020.11.30 |
PyTorch Lighting + Ray tune (0) | 2020.11.07 |
[TIP / Pytorch] torch class name 얻는 방법 (0) | 2020.10.31 |