INNER CODE UNIT · Python

forward

pprp/awesome-attention-mechanism-in-cv · Plug-and-Play-Module/ACBlock.py:15

    def forward(self, input):
        return input[:, :, self.rows_to_crop:-self.rows_to_crop, self.cols_to_crop:-self.cols_to_crop]


class ACBlock(nn.Module):
    def __init__(self,
                 in_channels,
                 out_channels,
                 kernel_size,
                 stride=1,
                 padding=0,
                 dilation=1,
                 groups=1,
                 padding_mode='zeros',
                 deploy=False):
        super(ACBlock, self).__init__()
        self.deploy = deploy
        if deploy:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…