model = pickle.load(open('model/clf.weights', 'rb'))expected = test_targetpredicted = model.predict(data)
不是fit函数的原因,自行建立的训练集能够成功,但是sklearn中构建的模型不能成功