Supposing I have a complex model, built up of individual
Sequentials with their own
Modules. In such nested condition, I wish to extract a simple list of all individual layers with arbitrary depth. Entire network is sequential so the flow of tensors wouldn’t be interruped:
blocks = [*newmodel.children()] interm = [*blocks.children()] #.....And we go on, iterating modules appending layers to list - getting their children() etc.
something like this is progress but is too cumbersome for complex nets.
I don’t really mind using this, but if anyone has a more neater solution, I’m all years