Skip to content

Commit 81bb26f

Browse files
author
xuwei06
committed
Removing debug print and moving assert
1 parent a5c9e6a commit 81bb26f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

python/paddle/v2/fluid/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ def get_parameter_value(para, executor):
244244
:param para: the given parameter
245245
:return: the LoDTensor for the parameter
246246
"""
247+
assert is_parameter(para)
248+
247249
get_program = Program()
248250
block = get_program.global_block()
249251
new_var = _clone_var_in_block_(block, para)
@@ -263,5 +265,4 @@ def get_parameter_value_by_name(name, executor, program=None):
263265
if program is None:
264266
program = g_main_program
265267
var = program.global_block().var(name)
266-
assert is_parameter(var)
267268
return get_parameter_value(var, executor)

python/paddle/v2/fluid/layer_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def append_bias_op(self, input_var, dim_start=1, dim_end=None):
158158
or equal than 2.
159159
:param dim_start:
160160
:param dim_end: the shape of the bias will be
161-
input_var.shape(dim_start:dim_end). The bias is broadcast to other
161+
input_var.shape[dim_start:dim_end]. The bias is broadcasted to other
162162
dimensions and added to input_var to get the output
163163
"""
164164
size = list(input_var.shape[dim_start:dim_end])

python/paddle/v2/fluid/layers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ def conv2d(input,
676676
filter_shape = [num_filters, num_filter_channels] + filter_size
677677

678678
std = (2.0 / (filter_size[0]**2 * num_channels))**0.5
679-
print 'name=', name, 'std=', std
680679
filter = helper.create_parameter(
681680
attr=helper.param_attr,
682681
shape=filter_shape,

0 commit comments

Comments
 (0)