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

You may need to pass the encoding= option to numpy.load #345

Open
hywgithub opened this issue Sep 21, 2019 · 5 comments
Open

You may need to pass the encoding= option to numpy.load #345

hywgithub opened this issue Sep 21, 2019 · 5 comments

Comments

@hywgithub
Copy link

I run fanster rcnn train model:hyw@hyw-Inspiron-5680:~/PycharmProjects/hyw-DIY/Faster-RCNN_TF$ ./experiments/scripts/faster_rcnn_end2end.sh gpu 0 VGG16 pascal_voc, result a error as follow:
......
<\xe7<\xbc\xec}\x0e\xbc$b?;\x14Z\x1f;F\xa8\xb6\xbax\x19\xde\xbb\xf1\xd5\xf8;nIN\xbb\xc8,l;\xa5D\x9e\xbc4Z\x98<\x98\x97\xf3:\xb3b;\xa4\x9e7;\xe0\x95\x84;\xc5\xf5\<\x17\x8eM\xbc5\xe49:\xeb\xb6\xac:%\x06\xb8\xba\xc0\xc2\xa7;\x9c#2; 2\xc3\xbb\x80\xde\x00\xbb\x013"\xbb\xd9S%\xbb\x0f\x8a3\xbc\xb8\x8a\x02<\xe6\xaa\x81\xbb\x13Z\xbc:&6|;\x9f}\xdd;\x14\r\xcc\xb9\"\x05\xbc\x7fA7\xbb#3;\x9a\xf2{:X\x0f\x9d\xbb\xad{\xb9\xab\xf6\x88\xbc \xdf\x9e;', 0, 1, 'ordinal not in range(128)')
You may need to pass the encoding= option to numpy.load

how to fix this error?

@ahagary
Copy link

ahagary commented Nov 6, 2019

hello,have you solved the error? I have met the same situation

@ahagary
Copy link

ahagary commented Nov 6, 2019

All right, I have solved it by adding encoding='bytes' in ./lib/network/network.py load() line 48
np.load(datapath, encoding='bytes').item()

@hywgithub
Copy link
Author

hywgithub commented Feb 19, 2020 via email

@roshambo919
Copy link

I had to use encoding='latin1' in order to get this to work, for anyone else out there.

@TarasKuzyo
Copy link

To add some context, I got this error when saving data with python 2 and then loading with python 3. Adding encoding='bytes' solved the problem.

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

No branches or pull requests

4 participants