I run through the Quickstart tutorial of the tf.contrib.learn, which uses the Iris data set. After training the DNN model I get an accuracy of ~0.967.

In an attempt to improve the accuracy, I tried to change the number and size of the hidden layers, I doubled the steps, and I changed optimizer and learning rates. However, the accuracy does not increase (or decrease).

Could that might be a dataset limitation?

Any ideas on how to improve the performance? I want to be able to dive into a NN and try to optimize it, before I go blindly into another tutorial.


1 Answer 1


An accuracy of 0.967 is a good score if you achieved it on the test set, so make sure that you are talking about the test set here. Secondly, increasing the number of iterations on the dataset won't do anything if your solution has already converged. Thirdly, adding more layers is not a very good idea, since you are already using a DNN classifier and could lead to overfitting. That being said, try to caculate a cross_validation score for your dataset, as then run it on a test set. In corss-validation you basically train your model on different chunks of your dataset, and validate on the chunk you leave out, then test it on a separate test set. This way you can actually see how your hyperparameters are behaving and you won't have to guess. Once you calculate the test score this way, it means you have good values of the parameters. If you still don't feel satisfied with the accuracy, its time to try a different algorithm, using more units in each layer and trying different activation functions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.