def translate(self, batch, step, attn_debug=False):
        """Generates summaries from one batch of data."""
        self.model.eval()
        with torch.no_grad():
            batch_data = self.translate_batch(batch)
            translations = self.from_batch(batch_data)
        return translations
Generates summaries from one batch of data.
dpkd/transformers/examples/research_projects/bertabs/modeling_bertabs.py