Skip to content

Commit 2b9a280

Browse files
author
Guanheng Zhang
committed
switch to the API in torchtext 0.9.0
1 parent fcbeeb2 commit 2b9a280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/BERT/cross_lingual_mlm_task.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def text_transform(x: str) -> List:
138138

139139
for epoch in range(1, args.epochs + 1):
140140
train_data = CC100('/datasets01/cc100/031720/', {'*.txt'}, start_line=args.start_line, num_lines=args.num_lines)
141-
from torchtext.experimental.datasets.raw import WikiText2
141+
from torchtext.datasets import WikiText2
142142
val_data, = WikiText2(data_select='valid')
143143
val_data = [(17, item) for item in val_data if item != ' \n'] # english language type is 17 in CC100 dataset
144144

0 commit comments

Comments
 (0)