diff --git a/python/paddle/v2/data_feeder.py b/python/paddle/v2/data_feeder.py index 56976baa3d523ec878a8470cfc280a4093f62ddf..ca3e44e5a0187da33654f4955197196b150da196 100644 --- a/python/paddle/v2/data_feeder.py +++ b/python/paddle/v2/data_feeder.py @@ -39,9 +39,8 @@ class DataFeeder(DataProviderConverter): .. code-block:: python - data_types = [('image', paddle.data_type.dense_vector(784)), - ('label', paddle.data_type.integer_value(10))] feeding = ['image', 'label'] + data_types = enumerate_data_types_of_data_layers(topology) feeder = DataFeeder(data_types=data_types, feeding=feeding) minibatch_data = [([1.0, 2.0, 3.0, ...], 5)] diff --git a/python/paddle/v2/trainer.py b/python/paddle/v2/trainer.py index a207beb548f0fda6d7aacf5c55e53d937e18a924..f5797a86c2b71502a7791453ff86c6a486c9f185 100644 --- a/python/paddle/v2/trainer.py +++ b/python/paddle/v2/trainer.py @@ -81,7 +81,7 @@ class SGD(object): :type event_handler: (BaseEvent) => None :param feeding: Feeding is a map of neural network input name and array index that reader returns. - :type feeding: dict + :type feeding: dict|list :return: """ if event_handler is None: