From 81bb26f3bdacd2786ffdb4a2960bbee28e7834dd Mon Sep 17 00:00:00 2001 From: xuwei06 Date: Tue, 14 Nov 2017 21:32:31 -0800 Subject: [PATCH] Removing debug print and moving assert --- python/paddle/v2/fluid/io.py | 3 ++- python/paddle/v2/fluid/layer_helper.py | 2 +- python/paddle/v2/fluid/layers.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/v2/fluid/io.py b/python/paddle/v2/fluid/io.py index d1263c3e911..2d070814eef 100644 --- a/python/paddle/v2/fluid/io.py +++ b/python/paddle/v2/fluid/io.py @@ -244,6 +244,8 @@ def get_parameter_value(para, executor): :param para: the given parameter :return: the LoDTensor for the parameter """ + assert is_parameter(para) + get_program = Program() block = get_program.global_block() new_var = _clone_var_in_block_(block, para) @@ -263,5 +265,4 @@ def get_parameter_value_by_name(name, executor, program=None): if program is None: program = g_main_program var = program.global_block().var(name) - assert is_parameter(var) return get_parameter_value(var, executor) diff --git a/python/paddle/v2/fluid/layer_helper.py b/python/paddle/v2/fluid/layer_helper.py index 0a9ed818888..a97e07982bd 100644 --- a/python/paddle/v2/fluid/layer_helper.py +++ b/python/paddle/v2/fluid/layer_helper.py @@ -158,7 +158,7 @@ class LayerHelper(object): or equal than 2. :param dim_start: :param dim_end: the shape of the bias will be - input_var.shape(dim_start:dim_end). The bias is broadcast to other + input_var.shape[dim_start:dim_end]. The bias is broadcasted to other dimensions and added to input_var to get the output """ size = list(input_var.shape[dim_start:dim_end]) diff --git a/python/paddle/v2/fluid/layers.py b/python/paddle/v2/fluid/layers.py index 771a313598f..1789d2f82a8 100644 --- a/python/paddle/v2/fluid/layers.py +++ b/python/paddle/v2/fluid/layers.py @@ -676,7 +676,6 @@ def conv2d(input, filter_shape = [num_filters, num_filter_channels] + filter_size std = (2.0 / (filter_size[0]**2 * num_channels))**0.5 - print 'name=', name, 'std=', std filter = helper.create_parameter( attr=helper.param_attr, shape=filter_shape, -- GitLab