I have a directory which name is train containing two directories: dog and cat (each one presents a class), here is the code of cifar10 :
def read_cifar10(self