distribution over classes for a given token in the sentence.
text_field.index(self.vocab)
padding_lengths = text_field.get_padding_lengths()array_input = text_field.as_array(padding_lengths)
model_input = arrays_to_variables(array_input, add_batch_dimension=True)
output_dict = self.forward(tokens=model_input)
// Remove batch dimension, as we only had one input.
After Change
instance = Instance({"tokens": text_field})
instance.index_fields(self.vocab)
model_input = arrays_to_variables(instance.as_array_dict(), add_batch_dimension=True)
output_dict = self.forward(**model_input)
// Remove batch dimension, as we only had one input.