参考资料from sklearn.neural_network import MLPClassifierX = [[0., 0.], [1., 1.]]y = [0, 1]clf = MLPClassifier(solver='lbfgs', alpha=1e-5,hidden_layer_sizes=(5, 2), random_state=1)clf.fit(X, y)print(clf.predict([[2., 2.], [-1., -2.]])) 参考资料 http://scikit-learn.org/stable/modules/neural_networks_supervised.html