Keras input dimensions for a MLP
If I understand your question properly. In first example you have 4 input neurons and they are connected to 4 neurons. In second, 4 inputs are connected to 35 neurons. That's it, you simply add more neurons in hidden layer. Btw, what do you mean saying "learns it with an accuracy"?