import numpy as np
from torch.utils.data import Dataset


class ImageConverter(Dataset):

    def __init__(self, images_loader):
        self.loader = images_loader

    def __len__(self):
        return len(self.loader)

    def __getitem__(self, index):
        image = self.loader.__getitem__(index)
        image = image / 255.0
        indices = list(range(len(image.shape)))
        indices = [indices[-1]] + indices[:-1]
        image = np.transpose(image, indices)
        return image

d3f1219258acc7ef946ef993ca4bd2561b0d1118
<mask token>


class ImageConverter(Dataset):
    <mask token>

    def __len__(self):
        return len(self.loader)
    <mask token>

<mask token>


class ImageConverter(Dataset):

    def __init__(self, images_loader):
        self.loader = images_loader

    def __len__(self):
        return len(self.loader)
    <mask token>

<mask token>


class ImageConverter(Dataset):

    def __init__(self, images_loader):
        self.loader = images_loader

    def __len__(self):
        return len(self.loader)

    def __getitem__(self, index):
        image = self.loader.__getitem__(index)
        image = image / 255.0
        indices = list(range(len(image.shape)))
        indices = [indices[-1]] + indices[:-1]
        image = np.transpose(image, indices)
        return image

import numpy as np
from torch.utils.data import Dataset


class ImageConverter(Dataset):

    def __init__(self, images_loader):
        self.loader = images_loader

    def __len__(self):
        return len(self.loader)

    def __getitem__(self, index):
        image = self.loader.__getitem__(index)
        image = image / 255.0
        indices = list(range(len(image.shape)))
        indices = [indices[-1]] + indices[:-1]
        image = np.transpose(image, indices)
        return image
