我正在从此网站http://yann.lecun.com导入MNIST数据集,并将其值插入train_test_split模型中,但得到的是“找到的样本数量不一致的输入变量:[60000,59992]”
train_img = np.array(X_train)
train_labels = np.array(y_train)
test_img = np.array(X_test)
test_labels = np.array(y_test)
from sklearn import model_selection
#Features
X = train_img
#Labels
y = train_labels
X.shape
(60000, 1, 28, 28)
y.shape
(59992,)
X_train, X_test, y_train, y_test = model_selection.train_test_split(X,y,test_size=0.1)
错误部分
ValueError: Found input variables with inconsistent numbers of samples: [60000, 59992]