Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set allow_pickle True #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeiWang1999
Copy link

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