(text, max_len, pad_id)
| 601 | pad_id = self.tokenizer.get_command('pad').Id |
| 602 | |
| 603 | def pad_to(text, max_len, pad_id): |
| 604 | if len(text) > max_len: |
| 605 | text = text[:max_len] |
| 606 | else: |
| 607 | text = text + [pad_id] * (max_len - len(text)) |
| 608 | return text |
| 609 | |
| 610 | source_tokens = self.tokenizer.EncodeAsIds(source_text).tokenization |
| 611 | masked_tgt = target_text.split("|") |
nothing calls this directly
no outgoing calls
no test coverage detected