diff --git a/fastNLP/core/dataset.py b/fastNLP/core/dataset.py index ad338649..6cfe6e87 100644 --- a/fastNLP/core/dataset.py +++ b/fastNLP/core/dataset.py @@ -30,7 +30,7 @@ class DataSet(list): return self def index_field(self, field_name, vocab): - if isinstance(field_name, str) and isinstance(vocab, Vocabulary): + if isinstance(field_name, str): field_list = [field_name] vocab_list = [vocab] else: