编译此代码时出现错误。请帮助
train_images = train_images.as_matrix()
train_labels = train_labels.as_matrix()
test_images = test_images.as_matrix()
test_labels = test_labels.as_matrix()
答案 0 :(得分:0)
您可以尝试np.asmatrix()
,因为您的数组似乎是numpy数组,它没有as_matrix()
属性,例如
train_images = np.asmatrix(train_images)
train_labels = np.asmatrix(train_labels)
与测试集相同