Skip to content

Commit

Permalink
Added the necessay import of module (#30804)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur0904 authored and Ita Zaporozhets committed May 24, 2024
1 parent 95d9858 commit 9bb3087
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/en/training.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ so we can just convert that directly to a NumPy array without tokenization!

```py
from transformers import AutoTokenizer
import numpy as np

tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-cased")
tokenized_data = tokenizer(dataset["sentence"], return_tensors="np", padding=True)
Expand Down

0 comments on commit 9bb3087

Please sign in to comment.