From 608de7c0e3ea6184c5aa72bca93d10381d4baa1f Mon Sep 17 00:00:00 2001 From: Helin Wang Date: Wed, 22 Feb 2017 11:01:59 -0800 Subject: [PATCH] fix according to comments --- python/paddle/reader/decorator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index 1192b5de90..5fc799e61d 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 -- GitLab