FrancescoSaverioZuppichini / ResNet

Clean, scalable and easy to use ResNet implementation in Pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's exactly happening in this part? Can you 'please' explain?

Sayantan17 opened this issue · comments

nn.Sequential(
block(in_channels , out_channels, *args, **kwargs, downsampling=downsampling),
*[block(out_channels * block.expansion,
out_channels, downsampling=1, *args, **kwargs) for _ in range(n - 1)]
)

Hi, "please" is the magic word. This is a python inline for loop where I create one block after the other. Just google "inline for loop in python"