Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ListBuilder.layer(...) shouldn't need the index. #3888
Currently, when you use the ListBuilder, you need to specify the index for each layer. This is rather error prone when you copy-paste a layer, add a layer, reorganize layers etc.
Since the ListBuilder has full knowledge about the currently added layers, it could just find the current max number, and add the layer "below" that. This can thus be retrofitted straight in, just make an additional layer method w/o the index, have that method find the current max-num and invoke the existing with that number+1.
This would make the fluent API a bit more fluent:
.. without the problem of having to re-index all the indices if you want to e.g. add a new DropoutLayer at the top..