def unpickle(file):
fo = open(file, 'rb')
d = pickle.load(fo, encoding='latin1')
fo.close()
return {'x': np.cast[th.config.floatX]((-127.5 + d['data'].reshape((10000,3,32,32)))/128.), 'y': np.array(d['labels']).astype(np.uint8)}
评论列表
文章目录