[Pytorch] How to Apply the Weight Initialization (Code)

2020. 12. 17. 18:01분석 Python/Pytorch

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