CIFAR-10数据集处理
数据集下载官网:http://www.cs.toronto.edu/~kriz/cifar.html
def unpickle(file):
import pickle
with open(file, 'rb') as fo:
dict = pickle.load(fo, encoding='bytes')
return dict
train1=unpickle('data_batch_1')//读取数据集
print(np.shape(train1[b'labels']))//输出标签数组
print(np.shape(train1[b'data']))//输出图片数组

浙公网安备 33010602011771号