I am building an MLP in python with sklearn.neural_network MLPRegressor.
I have a grid search:
param_grid={'hidden_layer_sizes': [(100,100), (50,50,50), (100,)],
....
'solver':['adam', 'sgd']}
grid=GridSearchCV(MLPRegressor, param_grid, cv)
grid.fit(x_train, y_train)
...
What I find really strange: If I delete the solver in the param_grid, and adam as solver is selected, everything runs perfectly fine.
However, I want to use sgd as solver. As soon as I use that in the param Grid and don't change anything else, I get the error:
Value Error: Input contains NAN, infinity or a value too large for dtype ('float64') for line grid.fit
I checked my input: no Nan, no infinity, and normal values scaled between 0 and 1.
Why is that