MCPcopy Create free account
hub / github.com/dek924/PerX2CT / __init__

Method __init__

x2ct_nerf/modules/diffusionmodules/model.py:1242–1262  ·  view source on GitHub ↗
(self, in_channels, out_channels, *args, **kwargs)

Source from the content-addressed store, hash-verified

1240
1241class SimpleDecoder(nn.Module):
1242 def __init__(self, in_channels, out_channels, *args, **kwargs):
1243 super().__init__()
1244 self.model = nn.ModuleList([nn.Conv2d(in_channels, in_channels, 1),
1245 ResnetBlock(in_channels=in_channels,
1246 out_channels=2 * in_channels,
1247 temb_channels=0, dropout=0.0),
1248 ResnetBlock(in_channels=2 * in_channels,
1249 out_channels=4 * in_channels,
1250 temb_channels=0, dropout=0.0),
1251 ResnetBlock(in_channels=4 * in_channels,
1252 out_channels=2 * in_channels,
1253 temb_channels=0, dropout=0.0),
1254 nn.Conv2d(2*in_channels, in_channels, 1),
1255 Upsample(in_channels, with_conv=True)])
1256 # end
1257 self.norm_out = Normalize(in_channels)
1258 self.conv_out = torch.nn.Conv2d(in_channels,
1259 out_channels,
1260 kernel_size=3,
1261 stride=1,
1262 padding=1)
1263
1264 def forward(self, x):
1265 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