提交 81bb26f3 编写于 作者: X xuwei06

Removing debug print and moving assert

上级 a5c9e6ac
......@@ -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)
......@@ -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])
......
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册