MCPcopy Create free account
hub / github.com/OpenTalker/StyleHEAT / __init__

Method __init__

models/styleheat/base_function.py:380–390  ·  view source on GitHub ↗
(self, input_nc, feature_nc, norm_layer=nn.BatchNorm2d, nonlinearity=nn.LeakyReLU(),
                 use_spect=False)

Source from the content-addressed store, hash-verified

378 """
379
380 def __init__(self, input_nc, feature_nc, norm_layer=nn.BatchNorm2d, nonlinearity=nn.LeakyReLU(),
381 use_spect=False):
382 super(FineADAINResBlock2d, self).__init__()
383
384 kwargs = {'kernel_size': 3, 'stride': 1, 'padding': 1}
385 self.conv1 = spectral_norm(nn.Conv2d(input_nc, input_nc, **kwargs), use_spect)
386 self.conv2 = spectral_norm(nn.Conv2d(input_nc, input_nc, **kwargs), use_spect)
387 self.norm1 = ADAIN(input_nc, feature_nc)
388 self.norm2 = ADAIN(input_nc, feature_nc)
389
390 self.actvn = nonlinearity
391
392 def forward(self, x, z):
393 x = self.actvn(self.norm1(self.conv1(x), z))

Callers

nothing calls this directly

Calls 3

spectral_normFunction · 0.85
ADAINClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected