在调试pva的时候,需要核对pkl文件
# -*- coding: utf-8 -*-
import pickle
f = open('voc_2007_trainval_gt_roidb.pkl','rb')
info = pickle.load(f)
for i in info:
print(i)
以为美滋滋,结果挂了
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
之前调试过一次,遇到了这个问题,又忘记了,还是记录一下吧
# -*- coding: utf-8 -*-
import pickle
f = open('voc_2007_trainval_gt_roidb.pkl','rb')
info = pickle.load(f, encoding='iso-8859-1') # 改成这样就可以了
for i in info:
print(i)