Browse Source

update sst loader

tags/v0.4.10
yunfan 5 years ago
parent
commit
dca1d56602
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      fastNLP/io/data_loader/sst.py

+ 2
- 1
fastNLP/io/data_loader/sst.py View File

@@ -64,7 +64,8 @@ class SSTLoader(DataSetLoader):
src_embed_op: EmbeddingOption = None):
input_name, target_name = 'words', 'target'
src_vocab = Vocabulary() if src_vocab_op is None else Vocabulary(**src_vocab_op)
tgt_vocab = Vocabulary() if tgt_vocab_op is None else Vocabulary(**tgt_vocab_op)
tgt_vocab = Vocabulary(unknown=None, padding=None) \
if tgt_vocab_op is None else Vocabulary(**tgt_vocab_op)

info = DataInfo(datasets=self.load(paths))
_train_ds = [info.datasets[name]


Loading…
Cancel
Save