Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
81bb26f3
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
81bb26f3
编写于
11月 14, 2017
作者:
X
xuwei06
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removing debug print and moving assert
上级
a5c9e6ac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
python/paddle/v2/fluid/io.py
python/paddle/v2/fluid/io.py
+2
-1
python/paddle/v2/fluid/layer_helper.py
python/paddle/v2/fluid/layer_helper.py
+1
-1
python/paddle/v2/fluid/layers.py
python/paddle/v2/fluid/layers.py
+0
-1
未找到文件。
python/paddle/v2/fluid/io.py
浏览文件 @
81bb26f3
...
@@ -244,6 +244,8 @@ def get_parameter_value(para, executor):
...
@@ -244,6 +244,8 @@ def get_parameter_value(para, executor):
:param para: the given parameter
:param para: the given parameter
:return: the LoDTensor for the parameter
:return: the LoDTensor for the parameter
"""
"""
assert
is_parameter
(
para
)
get_program
=
Program
()
get_program
=
Program
()
block
=
get_program
.
global_block
()
block
=
get_program
.
global_block
()
new_var
=
_clone_var_in_block_
(
block
,
para
)
new_var
=
_clone_var_in_block_
(
block
,
para
)
...
@@ -263,5 +265,4 @@ def get_parameter_value_by_name(name, executor, program=None):
...
@@ -263,5 +265,4 @@ def get_parameter_value_by_name(name, executor, program=None):
if
program
is
None
:
if
program
is
None
:
program
=
g_main_program
program
=
g_main_program
var
=
program
.
global_block
().
var
(
name
)
var
=
program
.
global_block
().
var
(
name
)
assert
is_parameter
(
var
)
return
get_parameter_value
(
var
,
executor
)
return
get_parameter_value
(
var
,
executor
)
python/paddle/v2/fluid/layer_helper.py
浏览文件 @
81bb26f3
...
@@ -158,7 +158,7 @@ class LayerHelper(object):
...
@@ -158,7 +158,7 @@ class LayerHelper(object):
or equal than 2.
or equal than 2.
:param dim_start:
:param dim_start:
:param dim_end: the shape of the bias will be
: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
dimensions and added to input_var to get the output
"""
"""
size
=
list
(
input_var
.
shape
[
dim_start
:
dim_end
])
size
=
list
(
input_var
.
shape
[
dim_start
:
dim_end
])
...
...
python/paddle/v2/fluid/layers.py
浏览文件 @
81bb26f3
...
@@ -676,7 +676,6 @@ def conv2d(input,
...
@@ -676,7 +676,6 @@ def conv2d(input,
filter_shape
=
[
num_filters
,
num_filter_channels
]
+
filter_size
filter_shape
=
[
num_filters
,
num_filter_channels
]
+
filter_size
std
=
(
2.0
/
(
filter_size
[
0
]
**
2
*
num_channels
))
**
0.5
std
=
(
2.0
/
(
filter_size
[
0
]
**
2
*
num_channels
))
**
0.5
print
'name='
,
name
,
'std='
,
std
filter
=
helper
.
create_parameter
(
filter
=
helper
.
create_parameter
(
attr
=
helper
.
param_attr
,
attr
=
helper
.
param_attr
,
shape
=
filter_shape
,
shape
=
filter_shape
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录