输出结果
核心代码
classifier = skflow.TensorFlowLinearClassifier(
n_classes=10, learning_rate=0.01)
classifier.fit(X_train, y_train)
linear_y_predict = classifier.predict(X_test)
classifier = skflow.TensorFlowDNNClassifier(hidden_units=[200, 50, 10], n_classes = 10,
learning_rate=0.01)
classifier.fit(X_train, y_train)
dnn_y_predict = classifier.predict(X_test)
classifier = skflow.TensorFlowEstimator(
model_fn=conv_model, n_classes=10, steps=20000,
learning_rate=0.001)
classifier.fit(X_train, y_train)
classifier.predict(X_test)