Number of units for first layer in Keras Sequential Model
You can try &quot;Border Pairs Method&quot;, &quot;Bipropagation&quot; or &quot;One step method&quot; to finding out how many neurons you need in each layer.
https://www.researchgate.net/publication/322617800_New_Deep_Learning_Algorithms_beyond_Backpropagation_IBM_Developers_UnConference_2018_Zurich