def translate_batch(self, batch, fast=False):
    "\n        Translate a batch of sentences.\n\n        Mostly a wrapper around :obj:`Beam`.\n\n        Args:\n           batch (:obj:`Batch`): a batch from a dataset object\n           data (:obj:`Dataset`): the dataset object\n           fast (bool): enables fast beam search (may not support all features)\n\n        Todo:\n           Shouldn't need the original dataset.\n        "
    with torch.no_grad():
        return self._fast_translate_batch(batch, self.max_length, min_length=self.min_length)
Translate a batch of sentences.

Mostly a wrapper around :obj:`Beam`.

Args:
   batch (:obj:`Batch`): a batch from a dataset object
   data (:obj:`Dataset`): the dataset object
   fast (bool): enables fast beam search (may not support all features)

Todo:
   Shouldn't need the original dataset.
def translate_batch(self, batch, fast=False):
    "\n        Translate a batch of sentences.\n\n        Mostly a wrapper around :obj:`Beam`.\n\n        Args:\n           batch (:obj:`Batch`): a batch from a dataset object\n           data (:obj:`Dataset`): the dataset object\n           fast (bool): enables fast beam search (may not support all features)\n\n        Todo:\n           Shouldn't need the original dataset.\n        "
    with torch.no_grad():
        return self._fast_translate_batch(batch, self.max_length, min_length=self.min_length)