Skip to content

Commit 0d40a4d

Browse files
authored
Add lod_level for data layer (#6040)
1 parent 4e564e4 commit 0d40a4d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/paddle/v2/fluid/layers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def data(name,
185185
shape,
186186
append_batch_size=True,
187187
dtype='float32',
188+
lod_level=0,
188189
type=core.VarDesc.VarType.LOD_TENSOR,
189190
main_program=None,
190191
startup_program=None,
@@ -198,6 +199,7 @@ def data(name,
198199
append_batch_size: Whether or not to append the data as a batch.
199200
dtype: The type of data : float32, float_16, int etc
200201
type: The output type. By default it is LOD_TENSOR.
202+
lod_level(int): The LoD Level. 0 means the input data is not a sequence.
201203
main_program: Name of the main program that calls this
202204
startup_program: Name of the startup program
203205
stop_gradient: A boolean that mentions whether gradient should flow.
@@ -228,7 +230,8 @@ def data(name,
228230
shape=shape,
229231
dtype=dtype,
230232
type=type,
231-
stop_gradient=stop_gradient)
233+
stop_gradient=stop_gradient,
234+
lod_level=lod_level)
232235

233236

234237
def create_tensor(dtype, name=None, main_program=None, startup_program=None):

0 commit comments

Comments
 (0)