当我尝试在 python 中加载文件时,我从 dill 收到此错误:
Traceback (most recent call last):
File "LArSoftSGD.py", line 154, in <module>
stat_bundle = train_batch_iterator(clf, TOTAL_TRAINED_EVENTS)
File "LArSoftSGD.py", line 121, in train_batch_iterator
plot_data.append((test_batch_iterator(clf), tte))
File "LArSoftSGD.py", line 91, in test_batch_iterator
minibatch_test = dill.load(stream)
File "/home/jdoe/.local/lib/python3.4/site-packages/dill/dill.py", line 199, in load
obj = pik.load()
File "/usr/lib/python3.4/pickle.py", line 1036, in load
dispatch[key[0]](self)
KeyError: 95
有人知道出了什么问题吗?这是我发生错误的一些代码:
for file in glob.glob('./SerializedData/Batch8202015_1999/*'):
with open(file, 'rb') as stream:
minibatch_test = dill.load(stream)