MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / __init__

Method __init__

src/model/modules.py:109–131  ·  view source on GitHub ↗
(self, nc_in, nc_out, nf, use_bias, norm, conv_by, conv_type,
                 use_skip_connection=False)

Source from the content-addressed store, hash-verified

107
108class UpSampleModule(BaseModule):
109 def __init__(self, nc_in, nc_out, nf, use_bias, norm, conv_by, conv_type,
110 use_skip_connection=False):
111 super().__init__(conv_type)
112 # Upsample 1
113 self.deconv1 = self.DeconvBlock(
114 nc_in * 2 if use_skip_connection else nc_in,
115 nf * 2, kernel_size=(3, 3, 3), stride=1, padding=1,
116 bias=use_bias, norm=norm, conv_by=conv_by)
117 self.conv9 = self.ConvBlock(
118 nf * 2, nf * 2, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=1,
119 bias=use_bias, norm=norm, conv_by=conv_by)
120 # Upsample 2
121 self.deconv2 = self.DeconvBlock(
122 nf * 4 if use_skip_connection else nf * 2,
123 nf * 1, kernel_size=(3, 3, 3), stride=1, padding=1,
124 bias=use_bias, norm=norm, conv_by=conv_by)
125 self.conv10 = self.ConvBlock(
126 nf * 1, nf // 2, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=1,
127 bias=use_bias, norm=norm, conv_by=conv_by)
128 self.conv11 = self.ConvBlock(
129 nf // 2, nc_out, kernel_size=(3, 3, 3), stride=(1, 1, 1),
130 padding=1, bias=use_bias, norm=None, activation=None, conv_by=conv_by)
131 self.use_skip_connection = use_skip_connection
132
133 def concat_feature(self, ca, cb):
134 if self.conv_type == 'partial':

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected