pickle.load returns a result with an error set

ساخت وبلاگ

Vote count: 0

I'm having some problems with loading a pkl file using pickle. I'm using windows 7, Python 3.5.1 64 bit and zodbpickle 0.6.0. The pkl file was downloaded from here: https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg16.pkl

This is my code:

from zodbpickle import pickle
# Load model weights and metadata
weightFile = open('vgg16.pkl', 'rb')
d = pickle.load(weightFile)

and when I run it I get the output

UnicodeDecodeError: 'ascii' codec can't decode byte 0xbc in position 1: ordinal not in range(128)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/work/lasagne/tutorial/lasagne-tutorial2.py", line 5, in <module> d = pickle.load(weightFile)
SystemError: <built-in method read of _io.BufferedReader object at 0x000000000101C678> retued a result with an error set
Process finished with exit code 1

What could be the cause of this problem?

asked 6 mins ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 312 تاريخ : جمعه 31 ارديبهشت 1395 ساعت: 22:59