smallcorgi / Faster-RCNN_TF

Faster-RCNN in Tensorflow
MIT License
2.34k stars 1.12k forks source link

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

Open hywgithub opened 5 years ago

hywgithub commented 5 years ago

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 commented 5 years ago

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

ahagary commented 5 years ago

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 commented 4 years ago

thank you very much!!

At 2019-11-06 20:05:57, "heyi" notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

roshambo919 commented 4 years ago

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

TarasKuzyo commented 9 months ago

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.