Fix typo in generation_algorithms.py (#364)

pull/365/head
Ikko Eltociear Ashimine 11 months ago committed by GitHub
parent 11f0d992d7
commit fd30f7ce10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,7 @@ class DecodingAlgorithm(ABC):
@abstractmethod @abstractmethod
def __call__(self, logits: torch.Tensor) -> Tuple[TokenIds, HypoIds]: def __call__(self, logits: torch.Tensor) -> Tuple[TokenIds, HypoIds]:
""" """
:param logits: A tensor of shape (batch_size, seq_lenth, vocab_size) :param logits: A tensor of shape (batch_size, seq_length, vocab_size)
:return: A tuple of selected token ids and corresponding hypotheses. :return: A tuple of selected token ids and corresponding hypotheses.
The shape of the token ids is (batch_size, seq_length), and the shape of the hypotheses is (batch_size) The shape of the token ids is (batch_size, seq_length), and the shape of the hypotheses is (batch_size)
""" """

Loading…
Cancel
Save