Skip to content

Commit 126e21a

Browse files
author
Yifan Peng
committed
remove tokenize from predict, because text_field will tokenize it
1 parent f193add commit 126e21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def eval(data_iter, model, args):
7777
def predict(text, model, text_field, label_feild):
7878
assert isinstance(text, str)
7979
model.eval()
80-
text = text_field.tokenize(text)
80+
# text = text_field.tokenize(text)
8181
text = text_field.preprocess(text)
8282
text = [[text_field.vocab.stoi[x] for x in text]]
8383
x = text_field.tensor_type(text)

0 commit comments

Comments
 (0)