Skip to content
Snippets Groups Projects
Commit 4d02db91 authored by BaptisteBrd's avatar BaptisteBrd
Browse files

fonciton 1 finie

parent e87c40c3
Branches
No related tags found
No related merge requests found
import numpy
import numpy as np
import pickle
def unpickle(file):
def read_cifar_batch(file):
with open(file, 'rb') as fo:
dict = pickle.load(fo, encoding='bytes')
return dict
data = np.array(dict[b'data']).astype('float32')
labels = np.array(dict[b'labels']).astype('int64')
return data, labels
dict1= unpickle("data/cifar-10-batches-py/data_batch_1")
vect1= read_cifar_batch("data/cifar-10-batches-py/data_batch_1")
data = [dict1[key] for key in dict1]
#print(vect1)
print(len(data[1]))
#def read_cifar_batch(path) :
#def read_cifar
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment