modelzoo.transformers.data_processing.qa.qa_utils.InputFeatures#
- class modelzoo.transformers.data_processing.qa.qa_utils.InputFeatures#
Bases:
tuple
InputFeatures(unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_max_context, input_ids, input_mask, segment_ids, start_position, end_position, is_impossible)
Create new instance of InputFeatures(unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_max_context, input_ids, input_mask, segment_ids, start_position, end_position, is_impossible)
Methods
Return number of occurrences of value.
Return first index of value.
Attributes
Alias for field number 2
Alias for field number 10
Alias for field number 1
Alias for field number 6
Alias for field number 7
Alias for field number 11
Alias for field number 8
Alias for field number 9
Alias for field number 5
Alias for field number 4
Alias for field number 3
Alias for field number 0
- __add__(value, /)#
Return self+value.
- __mul__(value, /)#
Return self*value.
- static __new__(_cls, unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_max_context, input_ids, input_mask, segment_ids, start_position, end_position, is_impossible)#
Create new instance of InputFeatures(unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_max_context, input_ids, input_mask, segment_ids, start_position, end_position, is_impossible)
- count(value, /)#
Return number of occurrences of value.
- doc_span_index#
Alias for field number 2
- end_position#
Alias for field number 10
- example_index#
Alias for field number 1
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
- input_ids#
Alias for field number 6
- input_mask#
Alias for field number 7
- is_impossible#
Alias for field number 11
- segment_ids#
Alias for field number 8
- start_position#
Alias for field number 9
- token_is_max_context#
Alias for field number 5
- token_to_orig_map#
Alias for field number 4
- tokens#
Alias for field number 3
- unique_id#
Alias for field number 0