import tensorflow as tf
# set up a linear classifier
classifier = tf.estimator.LinearClassifier()
# train the model on some example data
classfier.train(input=train_input_fn, steps=2000)
# use it to predict
predictions = classifier.predict(input_fn = predict_input_fn)
|