我发现解决此问题的一种不那么烦人的方法是手动下载和加载数据。这很容易,这就是我的做法。
from tensorflow.contrib import learn
# Downloads, unpacks and reads DBpedia dataset.
## dbpedia = learn.datasets.load_dataset('dbpedia')
## BUT THAT ABOVE FUNCTION DOESN'T WORK SO....
## MANUALLY DOWNLOAD THE DATA FROM THIS LINK:
## https://googledrive.com/host/0Bz8a_Dbh9Qhbfll6bVpmNUtUcFdjYmF2SEpmZUZUcVNiMUw1TWN6RDV3a0JHT3kxLVhVR2M/dbpedia_csv.tar.gz
## MANUALLY UNPACK THE DATA BY DOUBLE CLICKING IT
## make sure the paths are correct
## LOAD IT LIKE YOU WOULD A REGULAR CSV FILE.
train = pandas.read_csv('dbpedia_csv/train.csv', header=None)
X_train, y_train = train[2], train[0]
test = pandas.read_csv('dbpedia_csv/test.csv', header=None)
X_test, y_test = test[2], test[0]