请问这个error是如何造成的呢
来源:2-5 数据处理与模型图构建(1)

高斯的盾
2018-08-09
def load_data(filename):
"""read data from data file."""
with open(filename, 'rb') as f:
datas=pickle.load(f,encoding='bytes')
return datas['data'], datas['labels']
----> return datas['data'], datas['labels']
----> KeyError: 'data'
写回答
1回答
-
用data[b'data']试试?
112018-08-10
相似问题