| increment_list_index | R Documentation |
The torch R package uses the R standard of starting counts at 1. Many tokenizers use the Python standard of starting counts at 0. This function converts a list of token ids provided by such a tokenizer to torch-friendly values (by adding 1 to each id).
increment_list_index(list_of_integers)
The list of integers, with 1 added to each integer.
increment_list_index(
list(
1:5,
2:6,
3:7
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.