这是一个强制
imdb.load_data在笔记本中允许泡菜代替此行的技巧:
(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)
这样:
import numpy as np# save np.loadnp_load_old = np.load# modify the default parameters of np.loadnp.load = lambda *a,**k: np_load_old(*a, allow_pickle=True, **k)# call load_data with allow_pickle implicitly set to true(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)# restore np.load for future normal usagenp.load = np_load_old
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)