{"id":258238,"date":"2022-12-22T09:09:33","date_gmt":"2022-12-22T01:09:33","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=258238"},"modified":"2022-11-29T10:12:11","modified_gmt":"2022-11-29T02:12:11","slug":"object-arrays-cannot","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/object-arrays-cannot.html","title":{"rendered":"Object arrays cannot be loaded when allow_pickle=False\u7684\u95ee\u9898\u8be6\u89e3"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86Object arrays cannot be loaded when allow_pickle=False,\u672c\u6587\u7ed9\u5927\u5bb6\u5206\u4eab\u95ee\u9898\u89e3\u51b3\u601d\u8def\uff0c\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u4ee3\u7801\u662fDeep Learning with Python\u4e2d\u7684\uff1a<\/p>\n

from keras.datasets import imdb\r\n(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)<\/pre>\n

\u9519\u8bef\u6700\u540e\u4e00\u884c\u5982\u4e0b<\/p>\n

Object arrays cannot be loaded when allow_pickle=False<\/pre>\n
\u89e3\u51b3<\/strong><\/span><\/div>\n
  • \u627e\u5230\u6240\u5728imdb.py\u4e2d\u7684\u6240\u5728\u884c<\/li>\n
  • \u5c06np.load(path) \u6539\u4e3anp.load(path, allow_pickle=True)<\/li>\n
  • \u4fdd\u5b58\u3002\u91cd\u542fKernel<\/li>\n

    linux\u67e5\u627e\u65b9\u5f0f<\/p>\n

    \"\"<\/p>\n

    \u4fee\u6539\uff1a<\/p>\n

    \"\"<\/p>\n

    \u5230\u6b64\u8fd9\u7bc7\u5173\u4e8eObject arrays cannot be loaded when allow_pickle=False\u7684\u6587\u7ae0\u5c31\u4ecb\u7ecd\u5230\u8fd9\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u4ee3\u7801\u662fDeep Learning with Python\u4e2d\u7684\uff1a from keras.datasets imp […]<\/p>\n","protected":false},"author":362,"featured_media":241964,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-258238","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/258238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/362"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=258238"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/258238\/revisions"}],"predecessor-version":[{"id":258243,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/258238\/revisions\/258243"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/241964"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=258238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=258238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=258238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}