From 911ff3bf0cbca4dc626edfcbd63c87388d23b153 Mon Sep 17 00:00:00 2001 From: Xingjian Shi Date: Mon, 12 Mar 2018 15:02:28 -0700 Subject: [PATCH] fix CorpusReader (#10079) try to accelerate update Revert "update" This reverts commit 7d409b54e0fdb006e6d8be50749a90e24b12715d. Revert "try to accelerate" This reverts commit b7d93f9184323909ae59d77445d45588ea76aaa5. --- python/mxnet/gluon/data/text/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/mxnet/gluon/data/text/base.py b/python/mxnet/gluon/data/text/base.py index 6c4cf8778928..3c024245023f 100644 --- a/python/mxnet/gluon/data/text/base.py +++ b/python/mxnet/gluon/data/text/base.py @@ -20,7 +20,7 @@ """Base classes for text datasets and readers.""" -__all__ = ['WordLanguageReader'] +__all__ = ['CorpusReader', 'WordLanguageReader'] import io import os @@ -67,7 +67,7 @@ def read(self): if self._tokenizer: samples = [self._tokenizer(s) for s in samples if s] if self._flatten: - samples = flatten(samples) + samples = flatten_samples(samples) else: samples = [s for s in samples if s] return SimpleDataset(samples)