def __getitem__(self, index):
    (a_idx, p_idx, n_idx) = self.triplets[index]
    (anchor, positive, negative) = (self.data[a_idx], self.data[p_idx], self.data[n_idx])
    if (self.transform is not None):
        anchor = self.transform(anchor)
        positive = self.transform(positive)
        negative = self.transform(negative)
    return (anchor, positive, negative)
def __getitem__(self, index):
    (a_idx, p_idx, n_idx) = self.triplets[index]
    (anchor, positive, negative) = (self.data[a_idx], self.data[p_idx], self.data[n_idx])
    if (self.transform is not None):
        anchor = self.transform(anchor)
        positive = self.transform(positive)
        negative = self.transform(negative)
    return (anchor, positive, negative)