Python 当我使用MITSceneParsing数据实现FCNs时,我遇到了以下错误[TypeError:';NoneType';对象不可下标]
我在实现完全卷积网络时使用了MITSceneParsing数据。但我得到了这个错误[TypeError:'NoneType'对象不可下标]。有人知道这个原因吗Python 当我使用MITSceneParsing数据实现FCNs时,我遇到了以下错误[TypeError:';NoneType';对象不可下标],python,python-3.x,python-2.7,tensorflow,pickle,Python,Python 3.x,Python 2.7,Tensorflow,Pickle,我在实现完全卷积网络时使用了MITSceneParsing数据。但我得到了这个错误[TypeError:'NoneType'对象不可下标]。有人知道这个原因吗 import pickle def read_dataset(data_dir): pickle_filename = "MITSceneParsing.pickle" pickle_filepath = os.path.join(data_dir, pickle_filename) if not os.path
import pickle
def read_dataset(data_dir):
pickle_filename = "MITSceneParsing.pickle"
pickle_filepath = os.path.join(data_dir, pickle_filename)
if not os.path.exists(pickle_filepath):
utils.maybe_download_and_extract(data_dir, DATA_URL, is_zipfile=True)
SceneParsing_folder = os.path.splitext(DATA_URL.split("\\")[-1])[0]
result = create_image_lists(os.path.join(data_dir, SceneParsing_folder))
print("Pickling...")
with open(pickle_filepath, 'wb') as f:
pickle.dump(result, f, pickle.HIGHEST_PROTOCOL)
else:
print("Found pickle file!")
with open(pickle_filepath, 'rb') as f:
result = pickle.load(f)
training_records = result['training']
validation_records = result['validation']
del result
return training_records, validation_records
请显示堆栈跟踪的相关部分。请显示堆栈跟踪的相关部分。