FSRNet-pytorch icon indicating copy to clipboard operation
FSRNet-pytorch copied to clipboard

About the network architecture.

Open xjw00654 opened this issue 4 years ago • 2 comments

I noticed the code in the net.py and found the features[variable: prs] extracted by the Prior Estimation Network is not concatenated with the features extracted by the Coarse SR network. It seems like the pipeline in this code is Coarse -> Fine SR Enc -> Fine SR Dec which leaves the Prior Estimation Network as a independent module.

It is a little different from what illustated in the Figure2 in the FSRNet paper. Is there any mistakes or my mis-understanding?

# net.py -- FSRNet
def forward(self, x):
    y_c = self.csr_net(x)
    f = self.fsr_enc(y_c)
    p = self.pre_net(y_c)

    # 1x1 conv for hmaps & pmaps
    b1 = (self.prior_conv1 is not None)
    b2 = (self.prior_conv2 is not None)
    if b1 and b2:
        hmaps = self.prior_conv1(p)
        pmaps = self.prior_conv2(p)
        prs = torch.cat((hmaps, pmaps), 1)
    elif b1:
        prs = self.prior_conv1(p)
    elif b2:
        prs = self.prior_conv2(p)

    # HERE
    concat = torch.cat((f, p), 1)
    # HERE 

    out = self.fsr_dec(concat)
    return y_c, prs, out

xjw00654 avatar Jul 15 '20 03:07 xjw00654

O__O

cs-giung avatar Jul 15 '20 06:07 cs-giung

You're right. prs should be used.

cs-giung avatar Jul 15 '20 06:07 cs-giung