Skip to content

Commit

Permalink
Fix a bug, use _ceil_to_nearest instead as _round_to_nearest is not d…
Browse files Browse the repository at this point in the history
…efined (#6681)
  • Loading branch information
BestJuly authored May 19, 2023
1 parent 4084669 commit 1dc8b37
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def collate_fn(self, batch):
if self.pad_to_max_length:
max_length = self.max_seq_length
else:
max_length = min(self.max_seq_length, self._round_to_nearest(max_length, 8))
max_length = min(self.max_seq_length, self._ceil_to_nearest(max_length, 8))
assert max_length <= self.max_seq_length

attention_mask = [self._create_attention_mask(max_length) for _ in batch]
Expand Down

0 comments on commit 1dc8b37

Please sign in to comment.