Skip to content

Commit

Permalink
Removing debug print and moving assert
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei06 committed Nov 15, 2017
1 parent a5c9e6a commit 81bb26f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion python/paddle/v2/fluid/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion python/paddle/v2/fluid/layer_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def append_bias_op(self, input_var, dim_start=1, dim_end=None):
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])
Expand Down
1 change: 0 additions & 1 deletion python/paddle/v2/fluid/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 81bb26f

Please sign in to comment.