Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
f8373949
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f8373949
编写于
3月 14, 2019
作者:
M
minqiyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish code
test=develop
上级
7355d418
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
0 addition
and
11 deletion
+0
-11
paddle/fluid/imperative/tracer.h
paddle/fluid/imperative/tracer.h
+0
-4
python/paddle/fluid/framework.py
python/paddle/fluid/framework.py
+0
-4
python/paddle/fluid/imperative/nn.py
python/paddle/fluid/imperative/nn.py
+0
-3
未找到文件。
paddle/fluid/imperative/tracer.h
浏览文件 @
f8373949
...
@@ -56,10 +56,6 @@ class Tracer {
...
@@ -56,10 +56,6 @@ class Tracer {
std
::
vector
<
VarBase
*>
PyTrace
(
OpBase
*
op
,
const
std
::
vector
<
VarBase
*>&
inputs
,
std
::
vector
<
VarBase
*>
PyTrace
(
OpBase
*
op
,
const
std
::
vector
<
VarBase
*>&
inputs
,
bool
stop_gradient
=
false
);
bool
stop_gradient
=
false
);
static
void
StartProfile
();
static
void
StopProfile
();
private:
private:
platform
::
Place
GetPlace
(
const
VarBasePtrMap
&
inputs
);
platform
::
Place
GetPlace
(
const
VarBasePtrMap
&
inputs
);
...
...
python/paddle/fluid/framework.py
浏览文件 @
f8373949
...
@@ -290,7 +290,6 @@ class Variable(object):
...
@@ -290,7 +290,6 @@ class Variable(object):
dtype='float32')
dtype='float32')
"""
"""
# @profile
def
__init__
(
self
,
def
__init__
(
self
,
block
,
block
,
type
=
core
.
VarDesc
.
VarType
.
LOD_TENSOR
,
type
=
core
.
VarDesc
.
VarType
.
LOD_TENSOR
,
...
@@ -646,7 +645,6 @@ class Operator(object):
...
@@ -646,7 +645,6 @@ class Operator(object):
'checkpoint_notify'
,
'gen_nccl_id'
'checkpoint_notify'
,
'gen_nccl_id'
}
}
# @profile
def
__init__
(
self
,
def
__init__
(
self
,
block
,
block
,
desc
,
desc
,
...
@@ -1241,7 +1239,6 @@ class Block(object):
...
@@ -1241,7 +1239,6 @@ class Block(object):
return
(
item
[
1
]
for
item
in
six
.
iteritems
(
self
.
vars
)
return
(
item
[
1
]
for
item
in
six
.
iteritems
(
self
.
vars
)
if
isinstance
(
item
[
1
],
Parameter
))
if
isinstance
(
item
[
1
],
Parameter
))
# @profile
def
create_var
(
self
,
*
args
,
**
kwargs
):
def
create_var
(
self
,
*
args
,
**
kwargs
):
var
=
Variable
(
block
=
self
,
*
args
,
**
kwargs
)
var
=
Variable
(
block
=
self
,
*
args
,
**
kwargs
)
if
'initializer'
in
kwargs
:
if
'initializer'
in
kwargs
:
...
@@ -1350,7 +1347,6 @@ class Block(object):
...
@@ -1350,7 +1347,6 @@ class Block(object):
initializer
(
param
,
self
)
initializer
(
param
,
self
)
return
param
return
param
# @profile
def
append_op
(
self
,
*
args
,
**
kwargs
):
def
append_op
(
self
,
*
args
,
**
kwargs
):
"""
"""
Appends a new Operator according to the giving arguments.
Appends a new Operator according to the giving arguments.
...
...
python/paddle/fluid/imperative/nn.py
浏览文件 @
f8373949
...
@@ -97,7 +97,6 @@ class Conv2D(layers.Layer):
...
@@ -97,7 +97,6 @@ class Conv2D(layers.Layer):
dtype
=
self
.
_dtype
,
dtype
=
self
.
_dtype
,
is_bias
=
True
)
is_bias
=
True
)
# @profile
def
forward
(
self
,
input
):
def
forward
(
self
,
input
):
pre_bias
=
self
.
_helper
.
create_variable_for_type_inference
(
pre_bias
=
self
.
_helper
.
create_variable_for_type_inference
(
dtype
=
self
.
_dtype
)
dtype
=
self
.
_dtype
)
...
@@ -170,7 +169,6 @@ class Pool2D(layers.Layer):
...
@@ -170,7 +169,6 @@ class Pool2D(layers.Layer):
self
.
_exclusive
=
exclusive
self
.
_exclusive
=
exclusive
self
.
_l_type
=
'pool2d'
self
.
_l_type
=
'pool2d'
# @profile
def
forward
(
self
,
input
):
def
forward
(
self
,
input
):
pool_out
=
self
.
_helper
.
create_variable_for_type_inference
(
self
.
_dtype
)
pool_out
=
self
.
_helper
.
create_variable_for_type_inference
(
self
.
_dtype
)
...
@@ -231,7 +229,6 @@ class FC(layers.Layer):
...
@@ -231,7 +229,6 @@ class FC(layers.Layer):
else
:
else
:
self
.
_b
=
None
self
.
_b
=
None
# @profile
def
forward
(
self
,
input
):
def
forward
(
self
,
input
):
tmp
=
self
.
_helper
.
create_variable_for_type_inference
(
self
.
_dtype
)
tmp
=
self
.
_helper
.
create_variable_for_type_inference
(
self
.
_dtype
)
self
.
_helper
.
append_op
(
self
.
_helper
.
append_op
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录