boostcampaitech6 / level2-klue-nlp-01

level2-klue-nlp-01 created by GitHub Classroom
2 stars 1 forks source link

data_utils.py __getiem__ 수정 #5

Open ceo21ckim opened 8 months ago

ceo21ckim commented 8 months ago
    def __getitem__(self, idx):
        item = {key: val[idx].clone().detach() for key, val in self.datasets.items()}
        return item, torch.tensor(self.labels[idx])