Solved by darleybarreto in post #4 
              
              
                class CifarDataset(Dataset):
    """
    :root_indexes:  path to indexes compressed file
    :root_data:     path to data compressed file
    :transforms_:   list of functions from torchvision.transforms
    """

    def __init__(self, root_indexes: str, root_data: str, transforms_: list = []):
    …