pytorch_tiramisu icon indicating copy to clipboard operation
pytorch_tiramisu copied to clipboard

Found a waste line in models/tiramisu.py

Open truebelief opened this issue 5 years ago • 0 comments

The line 60 in your code, tiramisu.py, : cur_channels_count += prev_block_channels actually does nothing, since the cur_channels_count is overwritten before and after. Please consider removing it, since it is confusing and misleading.

        #######################
       #   Upsampling path   #
       #######################

       self.transUpBlocks = nn.ModuleList([])
       self.denseBlocksUp = nn.ModuleList([])
       for i in range(len(up_blocks)-1):
           self.transUpBlocks.append(TransitionUp(prev_block_channels, prev_block_channels))
           cur_channels_count = prev_block_channels + skip_connection_channel_counts[i]

           self.denseBlocksUp.append(DenseBlock(
               cur_channels_count, growth_rate, up_blocks[i],
                   upsample=True))
           prev_block_channels = growth_rate*up_blocks[i]
           cur_channels_count += prev_block_channels

truebelief avatar Aug 11 '19 21:08 truebelief