Created
July 4, 2018 12:29
-
-
Save weiaicunzai/22386286a1db3f348d3beff715f828fb to your computer and use it in GitHub Desktop.
_make_blocks.py
This file contains 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 _make_blocks(self, block_nums, layer_num, stride=2, block=RiRBlock): | |
layers = nn.Sequential() | |
in_channel = self.base | |
for block in range(block_nums): | |
layers.add_module("RiR_Block{}".format(block), RiRBlock(in_channel, self.base, layer_num, stride)) | |
in_channel = self.base | |
self.base *= 2 | |
return layers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment