我想使用python中的Sklearn在6000x784的数据集上训练MLP。我的网络具有以下内容:
以下是我的代码
import scipy.io
from sklearn.neural_network import MLPClassifier
# Extracting the training data
x = scipy.io.loadmat('mnist_train.mat')
data = x['train_X']
label = x['train_labels']
# Extracting the test data
x = scipy.io.loadmat('mnist_test.mat')
testData = x['test_X']
testLabel = x['test_labels']
# Training and fitting the model
clf = MLPClassifier(solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(100, 2), activation="relu")
clf.fit(data, label)
我想执行以下操作:
如何提供随机权重初始化并保存权重向量以及上述训练集误差值?
谢谢。