diff --git a/python/paddle/trainer/PyDataProvider2.py b/python/paddle/trainer/PyDataProvider2.py index 5ca4bcbca6906ae044035a689045bd6181a3827d..7b56b4a30ec891cfe8e4fc1be3c2a8a03e4b95e5 100644 --- a/python/paddle/trainer/PyDataProvider2.py +++ b/python/paddle/trainer/PyDataProvider2.py @@ -322,7 +322,13 @@ def provider(input_types=None, self.logger.warning('setting slots value is deprecated, ' 'please use input_types instead.') self.slots = outter_kwargs['slots'] - self.slots = input_types + + if input_types is not None: + self.slots = input_types + + assert self.slots is not None, \ + "Data Provider's input_types must be set" + self.should_shuffle = should_shuffle true_table = [1, 't', 'true', 'on']