contextnet/models/models.py
def _make_deconv_layer(self, num_deconv_filters, num_deconv_kernels):
        """use deconv layers to upsample backbone's output."""
        layers = []
        for i in range(len(num_deconv_filters)):
            feat_channel = num_deconv_filters[i]
            conv_module = ConvModule(
                self.in_channel,
                feat_channel,
                3,
                padding=1,
                conv_cfg=None,
                norm_cfg=dict(type='BN'))
            layers.append(conv_module)
            upsample_module = ConvModule(
                feat_channel,
                feat_channel,
                num_deconv_kernels[i],
                stride=2,
                padding=1,
                conv_cfg=dict(type='deconv'),
                norm_cfg=dict(type='BN'))
            layers.append(upsample_module)
            self.in_channel = feat_channel

        return nn.Sequential(*layers)
use deconv layers to upsample backbone's output.
use deconv layers to upsample backbone's output.
use deconv layers to upsample backbone ' s output .
def _make_deconv_layer(self, num_deconv_filters, num_deconv_kernels):
        layers = []
        for i in range(len(num_deconv_filters)):
            feat_channel = num_deconv_filters[i]
            conv_module = ConvModule(
                self.in_channel,
                feat_channel,
                3,
                padding=1,
                conv_cfg=None,
                norm_cfg=dict(type='BN'))
            layers.append(conv_module)
            upsample_module = ConvModule(
                feat_channel,
                feat_channel,
                num_deconv_kernels[i],
                stride=2,
                padding=1,
                conv_cfg=dict(type='deconv'),
                norm_cfg=dict(type='BN'))
            layers.append(upsample_module)
            self.in_channel = feat_channel
        return nn.Sequential(*layers)
def _make_deconv_layer ( self , num_deconv_filters , num_deconv_kernels ) : layers = [ ] for i in range ( len ( num_deconv_filters ) ) : feat_channel = num_deconv_filters [ i ] conv_module = ConvModule ( self . in_channel , feat_channel , 3 , padding = 1 , conv_cfg = None , norm_cfg = dict ( type = 'BN' ) ) layers . append ( conv_module ) upsample_module = ConvModule ( feat_channel , feat_channel , num_deconv_kernels [ i ] , stride = 2 , padding = 1 , conv_cfg = dict ( type = 'deconv' ) , norm_cfg = dict ( type = 'BN' ) ) layers . append ( upsample_module ) self . in_channel = feat_channel return nn . Sequential ( * layers )
use deconv layers to upsample backbone's output.
use deconv layers to upsample backbone ' s output .
"""use deconv layers to upsample backbone's output."""
self
num_deconv_filters
num_deconv_kernels