Created
May 3, 2020 18:56
-
-
Save Blaizzy/94825b8fab47a8c8b709e7c282e979ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def res_block(nf): | |
| return ResSequential( | |
| [conv(nf, nf), conv(nf, nf, actn=False)], | |
| 0.1) # conv-> Relu-> conv | |
| #---------------------- | |
| def upsample(ni, nf, scale): | |
| layers = [] | |
| for i in range(int(math.log(scale,2))): | |
| layers += [conv(ni, nf*4), nn.PixelShuffle(2)] | |
| return nn.Sequential(*layers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment