andreas128 / SRFlow

Official SRFlow training code: Super-Resolution using Normalizing Flow in PyTorch
Other
829 stars 112 forks source link

Is the RRDBNet correct? #52

Open vagrant3427 opened 2 years ago

vagrant3427 commented 2 years ago

In the forward function of the RRDBNet

def forward(self, x, get_steps=False):
    fea = self.conv_first(x)
    block_idxs = opt_get(self.opt, ['network_G', 'flow', 'stackRRDB', 'blocks']) or []
    block_results = {}
    for idx, m in enumerate(self.RRDB_trunk.children()):            
        fea = m(fea)                                               
        for b in block_idxs:
            if b == idx:
                block_results["block_{}".format(idx)] = fea         
    trunk = self.trunk_conv(fea)
    last_lr_fea = fea + trunk             

It seems that fea in the last_lr_fea=fea+trunk line is the feature of the last RRDB block before self.turnk_conv. But to my knowledge, the skip connection should be last_lr_fea = x+ trunk. Is my understanding right?