2024年6月6日发(作者:闪卫)
if :
downloaded_list = _list
else:
downloaded_list = _list
= []
s = []
# now load the picked numpy arrays
for file_name, checksum in downloaded_list:
file_path = (, _folder, file_name)
with open(file_path, 'rb') as f:
if n_info[0] == 2:
entry = (f)
else:
entry = (f, encoding='latin1')
(entry['data'])
if 'labels' in entry:
(entry['labels'])
else:
(entry['fine_labels'])
= ().reshape(-1, 3, 32, 32)
= ose((0, 2, 3, 1)) # convert to HWC
self._load_meta()
2024年6月6日发(作者:闪卫)
if :
downloaded_list = _list
else:
downloaded_list = _list
= []
s = []
# now load the picked numpy arrays
for file_name, checksum in downloaded_list:
file_path = (, _folder, file_name)
with open(file_path, 'rb') as f:
if n_info[0] == 2:
entry = (f)
else:
entry = (f, encoding='latin1')
(entry['data'])
if 'labels' in entry:
(entry['labels'])
else:
(entry['fine_labels'])
= ().reshape(-1, 3, 32, 32)
= ose((0, 2, 3, 1)) # convert to HWC
self._load_meta()