From a11d4f300e39fbc0b167ab5c6a4a8f7beae02fde Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Wed, 31 Oct 2018 11:37:02 +0800 Subject: [PATCH] use len instead of size for python list --- python/paddle/fluid/transpiler/distribute_transpiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/transpiler/distribute_transpiler.py b/python/paddle/fluid/transpiler/distribute_transpiler.py index b71bd48baff..c10a1348ec4 100644 --- a/python/paddle/fluid/transpiler/distribute_transpiler.py +++ b/python/paddle/fluid/transpiler/distribute_transpiler.py @@ -767,7 +767,7 @@ in a single call.") prefetch_var_name_to_block_id.extend( lookup_table_var_name_to_block_id) - if optimize_blocks.size() == 0: + if len(optimize_blocks) == 0: pre_block_idx = pserver_program.num_blocks - 1 empty_block = pserver_program._create_block(pre_block_idx) optimize_blocks.append(empty_block) -- GitLab