Initialize state.
(self, x: torch.Tensor)
| 87 | self.output = torch.nn.Linear(self.d_model, vocab_size) |
| 88 | |
| 89 | def init_state(self, x: torch.Tensor): |
| 90 | """Initialize state.""" |
| 91 | return self.decoder.default_state(1, device=x.device) |
| 92 | |
| 93 | def forward( |
| 94 | self, |