View source: R/run_classifier.R
InputFeatures | R Documentation |
InputFeatures
An InputFeatures object is a single set of features of data.
InputFeatures( input_ids, input_mask, segment_ids, label_id, is_real_example = TRUE )
input_ids |
Integer Tensor; the sequence of token ids in this example. |
input_mask |
Integer Tensor; sequence of 1s (for "real" tokens) and 0s (for padding tokens). |
segment_ids |
Integer Tensor; aka token_type_ids. Indicators for which sentence (or sequence each token belongs to). Classical BERT supports only 0s and 1s (for first and second sentence, respectively). |
label_id |
Integer; represents training example classification labels. |
is_real_example |
Logical; later on this is used as a flag for whether to "count" this example for calculating accuracy and loss. |
An object of class InputFeatures
.
## Not run: features <- InputFeatures(input_ids, input_mask, segment_ids, label_id) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.