parameters: (self, reader, places=None)
docstring: Set the data source of the PyReader object. 
  
          The provided :code:`reader` should be a Python generator,
          which yields list(numpy.ndarray) typed batched data. 
          
          :code:`places` must be set when the PyReader object is iterable.
  
          Args:
              reader (generator): Python generator that yields 
                  list(numpy.ndarray)-typed batched data. 
              places (None|list(CUDAPlace)|list(CPUPlace)): place list. Must
                  be provided when PyReader is iterable.
          
          Example:
              .. code-block:: python
  
                  import paddle
                  import paddle.fluid as fluid
                  import numpy as np
  
                  EPOCH_NUM = 3
                  ITER_NUM = 15
                  BATCH_SIZE = 3
  
                  def network(image, label):
                      # User-defined network, here is an example of softmax regression.
                      predict = fluid.layers.fc(input=image, size=10, act='softmax')           
                      return fluid.layers.cross_entropy(input=predict, label=label)
  
                  def random_image_and_label_generator(height, width):
                      def generator():
                          for i in range(ITER_NUM):
                              fake_image = np.random.uniform(low=0,
                                                             high=255,
                                                             size=[height, width])
                              fake_label = np.ones([1])
                              yield fake_image, fake_label
                      return generator
  
                  image = fluid.data(name='image', shape=[None, 784, 784], dtype='float32')
                  label = fluid.data(name='label', shape=[None, 1], dtype='int64')
                  reader = fluid.io.PyReader(feed_list=[image, label], capacity=4, iterable=True)
  
                  user_defined_generator = random_image_and_label_generator(784, 784)
                  reader.decorate_sample_list_generator(
                      paddle.batch(user_defined_generator, batch_size=BATCH_SIZE),
                      fluid.core.CPUPlace())
                  
                  loss = network(image, label)
                  executor = fluid.Executor(fluid.core.CPUPlace())
                  executor.run(fluid.default_startup_program())
  
                  for _ in range(EPOCH_NUM):
                      for data in reader():
                          executor.run(feed=data, fetch_list=[loss])
docstring_summary: Set the data source of the PyReader object.
docstring_tokens: Set the data source of the PyReader object .
function: def decorate_sample_list_generator(self, reader, places=None):
          '''
          Set the data source of the PyReader object. 
  
          The provided :code:`reader` should be a Python generator,
          which yields list(numpy.ndarray) typed batched data. 
          
          :code:`places` must be set when the PyReader object is iterable.
  
          Args:
              reader (generator): Python generator that yields 
                  list(numpy.ndarray)-typed batched data. 
              places (None|list(CUDAPlace)|list(CPUPlace)): place list. Must
                  be provided when PyReader is iterable.
          
          Example:
              .. code-block:: python
  
                  import paddle
                  import paddle.fluid as fluid
                  import numpy as np
  
                  EPOCH_NUM = 3
                  ITER_NUM = 15
                  BATCH_SIZE = 3
  
                  def network(image, label):
                      # User-defined network, here is an example of softmax regression.
                      predict = fluid.layers.fc(input=image, size=10, act='softmax')           
                      return fluid.layers.cross_entropy(input=predict, label=label)
  
                  def random_image_and_label_generator(height, width):
                      def generator():
                          for i in range(ITER_NUM):
                              fake_image = np.random.uniform(low=0,
                                                             high=255,
                                                             size=[height, width])
                              fake_label = np.ones([1])
                              yield fake_image, fake_label
                      return generator
  
                  image = fluid.data(name='image', shape=[None, 784, 784], dtype='float32')
                  label = fluid.data(name='label', shape=[None, 1], dtype='int64')
                  reader = fluid.io.PyReader(feed_list=[image, label], capacity=4, iterable=True)
  
                  user_defined_generator = random_image_and_label_generator(784, 784)
                  reader.decorate_sample_list_generator(
                      paddle.batch(user_defined_generator, batch_size=BATCH_SIZE),
                      fluid.core.CPUPlace())
                  
                  loss = network(image, label)
                  executor = fluid.Executor(fluid.core.CPUPlace())
                  executor.run(fluid.default_startup_program())
  
                  for _ in range(EPOCH_NUM):
                      for data in reader():
                          executor.run(feed=data, fetch_list=[loss])
                   
          '''
          self._loader.set_sample_list_generator(reader, places)
function_tokens: def decorate_sample_list_generator ( self , reader , places = None ) : self . _loader . set_sample_list_generator ( reader , places )