How to fix 'Object arrays cannot be loaded when allow_pickle=False' for imdb.load_data() function?

后端 未结 20 2285
花落未央
花落未央 2020-12-04 11:28

I\'m trying to implement the binary classification example using the IMDb dataset in Google Colab. I have implemented this model before. But when I tried to

20条回答
  •  星月不相逢
    2020-12-04 11:46

    Its work for me

            np_load_old = np.load
            np.load = lambda *a: np_load_old(*a, allow_pickle=True)
            (x_train, y_train), (x_test, y_test) = reuters.load_data(num_words=None, test_split=0.2)
            np.load = np_load_old
    

提交回复
热议问题