MCPcopy Create free account
hub / github.com/deepbrainai-research/float / __init__

Method __init__

models/float/styledecoder.py:299–314  ·  view source on GitHub ↗
(self, in_channel, out_channel, kernel_size, style_dim, upsample=False, blur_kernel=[1, 3, 3, 1],
                 demodulate=True)

Source from the content-addressed store, hash-verified

297
298class StyledConv(nn.Module):
299 def __init__(self, in_channel, out_channel, kernel_size, style_dim, upsample=False, blur_kernel=[1, 3, 3, 1],
300 demodulate=True):
301 super().__init__()
302
303 self.conv = ModulatedConv2d(
304 in_channel,
305 out_channel,
306 kernel_size,
307 style_dim,
308 upsample=upsample,
309 blur_kernel=blur_kernel,
310 demodulate=demodulate,
311 )
312
313 self.noise = NoiseInjection()
314 self.activate = FusedLeakyReLU(out_channel)
315
316 def forward(self, input, style, noise=None):
317 out = self.conv(input, style)

Callers

nothing calls this directly

Calls 4

ModulatedConv2dClass · 0.85
NoiseInjectionClass · 0.85
FusedLeakyReLUClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected