Pickle保存pkl文件的保存和读取
cPickle保存使用cPickle.dump来将对象(train_roidb)序列化到文件(train_data_25fps.pkl)中。
import cPickle
cPickle.dump(train_roidb, open('train_data_25fps.pkl','w'), cPickle.HIGHEST_PROTOCOL)
cPickle装载
使用python的cPickle库中的load函数,可以读取pkl文件的内容。
data = cPickle.load(open('train_data_25fps.pkl'))
https://blog.csdn.net/qq_35290785/article/details/102690506
页:
[1]