@@ -88,19 +88,27 @@ def ctr_reader(
88
88
dense_slot_index(list(int)): the index of dense slots
89
89
sparse_slot_index(list(int)): the index of sparse slots
90
90
capacity(int): The buffer capacity maintained by :code:`py_reader`.
91
- thread_num(list|tuple ): List of tuples which declaring data shapes .
92
- batch_size(list|tuple ): List of strs which declaring data type .
93
- file_list(list|tuple) : List of ints which declaring data lod_level .
94
- slots(bool): slot id of all sparse feature
95
- name(basestring ): The prefix Python queue name and Reader name. None will
91
+ thread_num(int ): the thread num to read files by cpp reader .
92
+ batch_size(int ): batch size of data.
93
+ file_list(list(str)) : List of file names that need to read .
94
+ slots(list(int64)): list of slot id.
95
+ name(string ): The prefix Python queue name and Reader name. None will
96
96
be generated automatically.
97
97
98
98
Returns:
99
99
Variable: A Reader from which we can get feeding data.
100
100
101
101
Examples:
102
102
103
- 1. The basic usage of :code:`py_reader` is as follows:
103
+ 1. The basic usage of :code:`ctr_reader` is as follows:
104
+
105
+ .. code-block:: python
106
+
107
+ py_reader = fluid.contrib.ctr_reader.ctr_reader(
108
+ feed_dict=datas, file_type='plain', file_format='csv',
109
+ file_list=file_list, dense_slot_indexs=[1, 2, 3, 4], sparse_slot_indexs=[],
110
+ capacity=64, thread_num=20, batch_size=1000, slots=[], name='ctr_reader')
111
+
104
112
"""
105
113
if name is None :
106
114
queue_name = unique_name ('lod_tensor_blocking_queue' )
0 commit comments