def forward(self, input, *args, **kwargs): assert np.ndim(input) == 2 self.last_input = input return self.embed_words[input]