diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index 1192b5de90f980c31adb60aad7f2755c91bd2b2b..5fc799e61dab954b9993321c4e816f2f5abce448 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -66,7 +66,7 @@ def chain(*readers): [0, 0, 0, 1, 1, 1, 2, 2, 2] Args: - readerss: input readers. + readers: input readers. Returns: the new data reader. @@ -83,7 +83,7 @@ def chain(*readers): return reader -class ComposeNotAligned: +class ComposeNotAligned(ValueError): pass @@ -128,7 +128,8 @@ def compose(*readers, **kwargs): for o in outputs: if o is None: # None will be not be present if compose is aligned - raise ComposeNotAligned + raise ComposeNotAligned( + "outputs of readers are not aligned.") yield sum(map(make_tuple, outputs), ()) return reader