Delegate squeeze to avoid modifying :func:`onmt.translate.translator.Translator.translate_batch()`
(self, dim=None)
| 21 | self.model_dec_outs = tuple(model_dec_outs) |
| 22 | |
| 23 | def squeeze(self, dim=None): |
| 24 | """Delegate squeeze to avoid modifying |
| 25 | :func:`onmt.translate.translator.Translator.translate_batch()` |
| 26 | """ |
| 27 | return EnsembleDecoderOutput([x.squeeze(dim) for x in self.model_dec_outs]) |
| 28 | |
| 29 | def __getitem__(self, index): |
| 30 | return self.model_dec_outs[index] |
no test coverage detected