Could someone point me to a basic working example for tf.estimator.DNNClassifier (originally skflow)?
Since I'm familiar with Sklearn, I was excited to read about Scikit Flow on this blog. Especially the api looked pretty much the same as SK-Learn.
However, I was having a problem getting the code from the blog to work.
Then I read from Scikit Flow Github that it moved to tensorflow/tensorflow/contrib/learn/python/learn.
Upon further investigation, I found tf.contrib.learn.DNNClassifier moved to tf.estimator.DNNClassifier.
However, now api for estimator seems pretty different than sklearn classifier.
I would appreciate if someone could point me to a basic working example.
Here's the code from the blog above.
import tensorflow.contrib.learn as skflow
from sklearn import datasets, metrics
iris = datasets.load_iris()
classifier = skflow.TensorFlowDNNClassifier(hidden_units=[10, 20, 10], n_classes=3)
classifier.fit(iris.data, iris.target)
score = metrics.accuracy_score(iris.target, classifier.predict(iris.data))
print("Accuracy: %f" % score)