PyTorch Forums
Use loop to define network
InnovArul
(Arul)
August 26, 2018, 5:08pm
2
what about this?
x = getattr(self, 'l' + str(i))
Alternatively, you can use
nn.ModuleList
1 Like
show post in topic