未验证 提交 16693577 编写于 作者: L LiuChiachi 提交者: GitHub

fix bugs (#5046)

上级 7e876736
...@@ -104,7 +104,7 @@ class CoupletDataset(TranslationDataset): ...@@ -104,7 +104,7 @@ class CoupletDataset(TranslationDataset):
'`train`, `dev` or `test` is supported but `{}` is passed in'. '`train`, `dev` or `test` is supported but `{}` is passed in'.
format(mode)) format(mode))
# Download data # Download data
self.data = self.get_data(root=root) self.data = self.get_data(mode=mode, root=root)
self.vocab, _ = self.get_vocab(root) self.vocab, _ = self.get_vocab(root)
self.transform() self.transform()
......
...@@ -266,7 +266,7 @@ class IWSLT15(TranslationDataset): ...@@ -266,7 +266,7 @@ class IWSLT15(TranslationDataset):
raise ValueError("`transform_func` must have length of two for" raise ValueError("`transform_func` must have length of two for"
"source and target.") "source and target.")
# Download data and read data # Download data and read data
self.data = self.get_data(root=root) self.data = self.get_data(mode=mode, root=root)
if transform_func is not None: if transform_func is not None:
self.data = [(transform_func[0](data[0]), self.data = [(transform_func[0](data[0]),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册