... |
... |
@@ -49,7 +49,7 @@ classifier = tf.estimator.Estimator(
|
49 |
49 |
classifier.train(input_fn = lambda:iris_data.train_input_fn(train_x, train_y, 100), steps=1000)
|
50 |
50 |
|
51 |
51 |
result = classifier.evaluate(input_fn = lambda : iris_data.eval_input_fn(test_x, test_y, 100))
|
52 |
|
-print result
|
|
52 |
+print (result)
|
53 |
53 |
|
54 |
54 |
predict_x = {
|
55 |
55 |
'SepalLength': [5.1, 5.9, 6.9],
|
... |
... |
@@ -61,4 +61,4 @@ predict_x = {
|
61 |
61 |
predictions = classifier.predict(input_fn = lambda : iris_data.eval_input_fn(predict_x, None, 100))
|
62 |
62 |
|
63 |
63 |
for p in predictions:
|
64 |
|
- print p
|
|
64 |
+ print (p)
|