Capacity allocation through neural network layers