Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
461d2fc0
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
461d2fc0
编写于
5月 14, 2018
作者:
T
tangwei12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename ckpt -> checkpoint
上级
a1419f10
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
12 deletion
+14
-12
paddle/fluid/operators/CMakeLists.txt
paddle/fluid/operators/CMakeLists.txt
+2
-2
paddle/fluid/operators/che'ck'po'in't_save_op_test.cc
paddle/fluid/operators/che'ck'po'in't_save_op_test.cc
+3
-3
paddle/fluid/operators/checkpoint_save_op.cc
paddle/fluid/operators/checkpoint_save_op.cc
+9
-7
未找到文件。
paddle/fluid/operators/CMakeLists.txt
浏览文件 @
461d2fc0
...
...
@@ -242,7 +242,7 @@ op_library(save_op DEPS lod_tensor)
op_library
(
load_op DEPS lod_tensor
)
op_library
(
save_combine_op DEPS lod_tensor
)
op_library
(
load_combine_op DEPS lod_tensor
)
op_library
(
c
kp
t_save_op DEPS lod_tensor
)
op_library
(
c
heckpoin
t_save_op DEPS lod_tensor
)
op_library
(
concat_op DEPS concat
)
# FIXME(thuan): Move CSP operators to paddle/fluid/framework/operators/concurrency
...
...
@@ -278,6 +278,6 @@ cc_test(beam_search_op_test SRCS beam_search_op_test.cc DEPS lod_tensor beam_sea
cc_test
(
strided_memcpy_test SRCS strided_memcpy_test.cc DEPS tensor memory
)
cc_test
(
save_load_op_test SRCS save_load_op_test.cc DEPS save_op load_op
)
cc_test
(
save_load_combine_op_test SRCS save_load_combine_op_test.cc DEPS save_combine_op load_combine_op
)
cc_test
(
c
kpt_save_op_test SRCS ckpt_save_op_test.cc DEPS ckp
t_save_op
)
cc_test
(
c
heckpoint_save_op_test SRCS checkpoint_save_op_test.cc DEPS checkpoin
t_save_op
)
nv_test
(
nccl_op_test SRCS nccl_op_test.cu.cc DEPS nccl_op gpu_info device_context
)
nv_test
(
dropout_op_test SRCS dropout_op_test.cc DEPS dropout_op tensor
)
paddle/fluid/operators/c
kp
t_save_op_test.cc
→
paddle/fluid/operators/c
he'ck'po'in'
t_save_op_test.cc
浏览文件 @
461d2fc0
...
...
@@ -15,9 +15,9 @@ limitations under the License. */
#include "gtest/gtest.h"
#include "paddle/fluid/framework/op_registry.h"
USE_NO_KERNEL_OP
(
c
kp
t_save
)
USE_NO_KERNEL_OP
(
c
heckpoin
t_save
)
TEST
(
C
kp
tSaveOp
,
CPU
)
{
TEST
(
C
heckpoin
tSaveOp
,
CPU
)
{
paddle
::
framework
::
Scope
scope
;
paddle
::
platform
::
CPUPlace
place
;
...
...
@@ -41,6 +41,6 @@ TEST(CkptSaveOp, CPU) {
attrs
.
insert
({
"file_path"
,
std
::
string
(
"tensor.save"
)});
auto
save_op
=
paddle
::
framework
::
OpRegistry
::
CreateOp
(
"c
kp
t_save"
,
{{
"X"
,
{
"test_var"
}}},
{},
attrs
);
"c
heckpoin
t_save"
,
{{
"X"
,
{
"test_var"
}}},
{},
attrs
);
save_op
->
Run
(
scope
,
place
);
}
paddle/fluid/operators/c
kp
t_save_op.cc
→
paddle/fluid/operators/c
heckpoin
t_save_op.cc
浏览文件 @
461d2fc0
...
...
@@ -57,9 +57,10 @@ static void MkDirRecursively(const char *fullpath) {
MkDir
(
fullpath
);
}
class
C
kp
tSaveOp
:
public
framework
::
OperatorBase
{
class
C
heckpoin
tSaveOp
:
public
framework
::
OperatorBase
{
public:
CkptSaveOp
(
const
std
::
string
&
type
,
const
framework
::
VariableNameMap
&
inputs
,
CheckpointSaveOp
(
const
std
::
string
&
type
,
const
framework
::
VariableNameMap
&
inputs
,
const
framework
::
VariableNameMap
&
outputs
,
const
framework
::
AttributeMap
&
attrs
)
:
OperatorBase
(
type
,
inputs
,
outputs
,
attrs
)
{}
...
...
@@ -122,9 +123,9 @@ class CkptSaveOp : public framework::OperatorBase {
}
};
class
C
kp
tSaveOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
class
C
heckpoin
tSaveOpProtoMaker
:
public
framework
::
OpProtoAndCheckerMaker
{
public:
C
kp
tSaveOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
C
heckpoin
tSaveOpProtoMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
...
...
@@ -155,4 +156,5 @@ to a file on disk.
namespace
ops
=
paddle
::
operators
;
REGISTER_OPERATOR
(
ckpt_save
,
ops
::
CkptSaveOp
,
ops
::
CkptSaveOpProtoMaker
);
REGISTER_OPERATOR
(
checkpoint_save
,
ops
::
CheckpointSaveOp
,
ops
::
CheckpointSaveOpProtoMaker
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录