Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【block】class TBSRN:in the tbsrn.py file,what does it mean? Thank you very much! #9

Closed
Lz-2019317 opened this issue Aug 20, 2021 · 1 comment

Comments

@Lz-2019317
Copy link

def forward:
             ......
             for i in range(self.srb_nums + 1):
                        block[str(i + 2)] = getattr(self, 'block%d' % (i + 2))(block[str(i + 1)])
            
                    block[str(self.srb_nums + 3)] = getattr(self, 'block%d' % (self.srb_nums + 3)) \
                        ((block['1'] + block[str(self.srb_nums + 2)]))
                    output = torch.tanh(block[str(self.srb_nums + 3)])

First quention:
block means basic unit of tbsrn,right?
i guess:
in the class of TBSRN,block1 means conv1 ?
block2-7 means TBSRN-n ? where n=srb_nums? but initinal param srb_nums euqals 5.
block8 means subsampling block ?


Sencond quention:
in the def forward:
how do upsampling block implement?
i just saw the code: block[str(self.srb_nums + 3)] = getattr(self, 'block%d' % (self.srb_nums + 3)) \ ((block['1'] + block[str(self.srb_nums + 2)]))
Thank you~~~~~~

@JingyeChen
Copy link
Member

block1~8 is sequentially defined in class TBSRN, you could refer to function "init"
Upsampling block is implemented with "class UpsampleBLock" using nn.PixelShuffle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants