RBPN-PyTorch icon indicating copy to clipboard operation
RBPN-PyTorch copied to clipboard

Parameters of Upblock

Open reubengann opened this issue 2 years ago • 0 comments

I am trying to reproduce this work. In The definition of DeconvBlock, your parameters are:

class DeconvBlock(torch.nn.Module):
    def __init__(self, input_size, output_size, kernel_size=4, stride=2, padding=1, bias=True, activation='prelu', norm=None):

When you go to use this class in, for instance, Upblock, you pass arguments:

class UpBlock(torch.nn.Module):
    def __init__(self, num_filter, kernel_size=8, stride=4, padding=2, bias=True, activation='prelu', norm=None):
        super(UpBlock, self).__init__()
        self.up_conv1 = DeconvBlock(num_filter, num_filter, kernel_size, stride, padding, activation, norm=None)

I don't understand how this can work. The 6th parameter of DeconvBlock is supposed to be bias (bool) but here your 6th argument is activation (str). How does this code work?

reubengann avatar Apr 10 '23 02:04 reubengann