Skip to content

Glossary: NLP with Transformers

Tensor

Also written: tensors, return_tensors

PyTorch's array type for numbers. `return_tensors="pt"` makes a tokenizer return PyTorch tensors instead of lists.

Where the book teaches it

Related terms

Padding, truncation