InputFeatures

class InputFeatures(input_ids: List[int], input_mask: List[int], segment_ids: List[int], label_id: int)[source]

Convert InputExample instance to InputFeature instance for easier manipulation

Parameters
  • input_ids (List[int]) – Contains list of input_ids created by tokenizer

  • input_mask (List[int]) – Contains list of input_mask created by tokenizer. Int needs to be either 1 or 0.

  • segment_ids (List[int], optional) – Contains list of segment_ids created by tokenizer. Int needs to be either 1 or 0. Defaults to None.

  • label_id (int) – Contains label of data.