MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / InputExample

Class InputExample

examples/tensorflow/xlnet/convertInput.py:70–87  ·  view source on GitHub ↗

A single training/test example for simple sequence classification.

Source from the content-addressed store, hash-verified

68
69
70class InputExample(object):
71 """A single training/test example for simple sequence classification."""
72
73 def __init__(self, guid, text_a, text_b=None, label=None):
74 """Constructs a InputExample.
75 Args:
76 guid: Unique id for the example.
77 text_a: string. The untokenized text of the first sequence. For single
78 sequence tasks, only this sequence must be specified.
79 text_b: (Optional) string. The untokenized text of the second sequence.
80 Only must be specified for sequence pair tasks.
81 label: (Optional) string. The label of the example. This should be
82 specified for train and dev examples, but not for test examples.
83 """
84 self.guid = guid
85 self.text_a = text_a
86 self.text_b = text_b
87 self.label = label
88
89
90"""

Callers 4

_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected