MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / __init__

Method __init__

lvdm/modules/networks/ae_modules.py:584–604  ·  view source on GitHub ↗
(self, in_channels, out_channels, *args, **kwargs)

Source from the content-addressed store, hash-verified

582
583class SimpleDecoder(nn.Module):
584 def __init__(self, in_channels, out_channels, *args, **kwargs):
585 super().__init__()
586 self.model = nn.ModuleList([nn.Conv2d(in_channels, in_channels, 1),
587 ResnetBlock(in_channels=in_channels,
588 out_channels=2 * in_channels,
589 temb_channels=0, dropout=0.0),
590 ResnetBlock(in_channels=2 * in_channels,
591 out_channels=4 * in_channels,
592 temb_channels=0, dropout=0.0),
593 ResnetBlock(in_channels=4 * in_channels,
594 out_channels=2 * in_channels,
595 temb_channels=0, dropout=0.0),
596 nn.Conv2d(2*in_channels, in_channels, 1),
597 Upsample(in_channels, with_conv=True)])
598 # end
599 self.norm_out = Normalize(in_channels)
600 self.conv_out = torch.nn.Conv2d(in_channels,
601 out_channels,
602 kernel_size=3,
603 stride=1,
604 padding=1)
605
606 def forward(self, x):
607 for i, layer in enumerate(self.model):

Callers

nothing calls this directly

Calls 4

ResnetBlockClass · 0.70
UpsampleClass · 0.70
NormalizeFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected