Skip to content

set allow_pickle True #77

Open
LeiWang1999 wants to merge 1 commit intomachrisaa:masterfrom
LeiWang1999:fix/load
Open

set allow_pickle True #77
LeiWang1999 wants to merge 1 commit intomachrisaa:masterfrom
LeiWang1999:fix/load

Conversation

@LeiWang1999
Copy link
Copy Markdown

When i execute this project on my machine , numpy.load(vgg19.npy) throw a err;

Traceback (most recent call last):
  File "test_vgg19.py", line 21, in <module>
    vgg = vgg19.Vgg19()
  File "/Users/wanglei/AICS-Course/Code/tensorflow-vgg/vgg19.py", line 20, in __init__
    self.data_dict = np.load(vgg19_npy_path, encoding='latin1').item()
  File "/Users/wanglei/opt/anaconda3/lib/python3.7/site-packages/numpy/lib/npyio.py", line 453, in load
    pickle_kwargs=pickle_kwargs)
  File "/Users/wanglei/opt/anaconda3/lib/python3.7/site-packages/numpy/lib/format.py", line 739, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False

I notice that my numpy version is 1.18.3,and the default value of allow_pickle was setted to False after the numpy version 1.17 released,so i give a value true explicitly.

The effect of allow_pickle can be seen here:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant