下载 IMDB 数据集出现ValueError错误
Code 代码:
imdb = keras.datasets.imdb
(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)
Error 错误:
ValueError: Object arrays cannot be loaded when allow_pickle=False
Reason 原因:
My version of numpy (1.16.4) has the default value of allow_pickle as False.
numpy版本是1.16.4,allow_pickle默认值是False,但值为True时才能下载该数据集。
Solution 解决方案:
Downgrading numpy version to 1.16.2
降低将numpy版本至1.16.2,即在Terminal输入command:
pip install numpy==1.16.2