GANs/Pix2Pix_Isola_et_al_2017/model.py
def init_weights(model, mean=0.0, std=0.02):
    """Initialize weights from a Gaussian distribution."""
    for module in model.modules():
        if isinstance(module, (nn.Conv2d, nn.BatchNorm2d)):
            nn.init.normal_(module.weight.data, mean=mean, std=std)
Initialize weights from a Gaussian distribution.
Initialize weights from a Gaussian distribution.
Initialize weights from a Gaussian distribution .
def init_weights(model, mean=0.0, std=0.02):
    for module in model.modules():
        if isinstance(module, (nn.Conv2d, nn.BatchNorm2d)):
            nn.init.normal_(module.weight.data, mean=mean, std=std)
def init_weights ( model , mean = 0.0 , std = 0.02 ) : for module in model . modules ( ) : if isinstance ( module , ( nn . Conv2d , nn . BatchNorm2d ) ) : nn . init . normal_ ( module . weight . data , mean = mean , std = std )
Initialize weights from a Gaussian distribution.
Initialize weights from a Gaussian distribution .
"""Initialize weights from a Gaussian distribution."""
model
mean
std