Keras input dimensions for a MLP I have been training a multilayer perceptron using Keras to make a prediction on a function similar to that of a normal distribution. I have  input variables , and I have one output value .
When I set my input layer to have  neurons as such

model.add(Dense(4, input_dim=4, activation= 'relu'))


the model learns with a  accuracy.
When I tried to use  neurons in my input layer as such

model.add(Dense(35, input_dim=4, activation= 'relu'))


my model learns it with an  accuracy.
I'm not understanding the logic behind this. Surely you have to have only  neurons for the input layer; what is happening with the other  neurons
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"?