You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/torch/utils/data/dataloader.py in next(self)
520 self._reset()
--> 521 data = self._next_data()
522 self._num_yielded += 1
/torch/utils/data/dataloader.py in _next_data(self)
560 index = self._next_index() # may raise StopIteration
--> 561 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
562 if self._pin_memory:
/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
/torch/utils/data/_utils/fetch.py in (.0)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
/code/read_data.py in getitem(self, idx)
209 if self.aug is not None:
--> 210 u, v, ori = self.aug(self.text[idx], self.ids[idx])
211 encode_result_u, length_u = self.get_tokenized(u)
This might be related to the dictionary file about the back-translations. This might be because several sentences are not back-translated, like the 9226th sentence.
%run /code/train.py --gpu=0 --n-labeled=10 --data-path /yahoo_answers_csv/ --batch-size=4 --batch-size-u=8 --epochs=50 --val-iteration=20 --lambda-u=0 --T=0.5 --alpha=16 --mix-layers-set 7 9 12 --separate-mix=True
train(labeled_trainloader, unlabeled_trainloader, model, optimizer, scheduler, criterion, epoch, n_labels, train_aug)
204 (inputs_u, inputs_u2, inputs_ori), (length_u,
--> 205 length_u2, length_ori) = unlabeled_train_iter.next()
206 except:
/torch/utils/data/dataloader.py in next(self)
520 self._reset()
--> 521 data = self._next_data()
522 self._num_yielded += 1
/torch/utils/data/dataloader.py in _next_data(self)
560 index = self._next_index() # may raise StopIteration
--> 561 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
562 if self._pin_memory:
/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
/torch/utils/data/_utils/fetch.py in (.0)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
/code/read_data.py in getitem(self, idx)
209 if self.aug is not None:
--> 210 u, v, ori = self.aug(self.text[idx], self.ids[idx])
211 encode_result_u, length_u = self.get_tokenized(u)
/code/read_data.py in call(self, ori, idx)
22 def call(self, ori, idx):
---> 23 out1 = self.de[idx]
24 out2 = self.ru[idx]
KeyError: 9226
May I ask what is the reason for this place? Thank you very much.
The text was updated successfully, but these errors were encountered: