Skip to content

Commit a11d4f3

Browse files
committed
use len instead of size for python list
1 parent fa84ba2 commit a11d4f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/transpiler/distribute_transpiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ def __clone_lr_op_sub_block__(op, program, lr_block):
767767
prefetch_var_name_to_block_id.extend(
768768
lookup_table_var_name_to_block_id)
769769

770-
if optimize_blocks.size() == 0:
770+
if len(optimize_blocks) == 0:
771771
pre_block_idx = pserver_program.num_blocks - 1
772772
empty_block = pserver_program._create_block(pre_block_idx)
773773
optimize_blocks.append(empty_block)

0 commit comments

Comments
 (0)