def __getitem__(self, index):
path, target = self.samples[index]<EOL>sample = self.loader(path)<EOL>if self.transform is not None:<EOL><INDENT>sample = self.transform(sample)<EOL><DEDENT>if self.target_transform is not None:<EOL><INDENT>target = self.target_transform(target)<EOL><DEDENT>return sample, target<EOL>
Args:
    index (int): Index

Returns:
    tuple: (sample, target) where target is class_index of the target class.