ls = ["A","B","C","D",1,2.5,[1,2.5,'a'],[[1,'m'],[0]] ]
label = [1,2,3,4]
index = 2
# 存储办法
f = open('video_clips_%d.pkl'%index, 'wb')
content = pickle.dumps( (ls,label) )
f.write(content)
f.close()
# 提取办法
f = open('video_info.pkl', 'rb')
cxk = pickle.loads(f.read())
print("输出刚保存的数据:",cxk,type(cxk))
f.close()
12-深度学习炼丹妙招——保留中间结果数据,不重复加载之使用pickle
最新推荐文章于 2024-10-30 10:42:33 发布