Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleFL
提交
13cba8d8
P
PaddleFL
项目概览
PaddlePaddle
/
PaddleFL
通知
35
Star
5
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
6
列表
看板
标记
里程碑
合并请求
4
Wiki
3
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleFL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
6
Issue
6
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
3
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
13cba8d8
编写于
8月 28, 2020
作者:
Q
Qinghe JING
提交者:
GitHub
8月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #110 from honshj/master
Fix dir creation race condition bug in examples
上级
c6665795
b9a37f56
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
3 deletion
+23
-3
python/paddle_fl/mpc/examples/lenet_with_mnist/train_lenet.py
...on/paddle_fl/mpc/examples/lenet_with_mnist/train_lenet.py
+7
-1
python/paddle_fl/mpc/examples/logistic_with_mnist/train_fc_sigmoid.py
...e_fl/mpc/examples/logistic_with_mnist/train_fc_sigmoid.py
+8
-1
python/paddle_fl/mpc/examples/logistic_with_mnist/train_fc_softmax.py
...e_fl/mpc/examples/logistic_with_mnist/train_fc_softmax.py
+8
-1
未找到文件。
python/paddle_fl/mpc/examples/lenet_with_mnist/train_lenet.py
浏览文件 @
13cba8d8
...
...
@@ -17,6 +17,7 @@ MNIST CNN Demo (LeNet5)
import
sys
import
os
import
errno
import
numpy
as
np
import
time
import
logging
...
...
@@ -117,7 +118,12 @@ def infer():
"""
mpc_infer_data_dir
=
"./mpc_infer_data/"
if
not
os
.
path
.
exists
(
mpc_infer_data_dir
):
os
.
mkdir
(
mpc_infer_data_dir
)
try
:
os
.
mkdir
(
mpc_infer_data_dir
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
prediction_file
=
mpc_infer_data_dir
+
"mnist_debug_prediction"
prediction_file_part
=
prediction_file
+
".part{}"
.
format
(
role
)
...
...
python/paddle_fl/mpc/examples/logistic_with_mnist/train_fc_sigmoid.py
浏览文件 @
13cba8d8
...
...
@@ -17,6 +17,7 @@ MNIST Demo
import
sys
import
os
import
errno
import
numpy
as
np
import
time
...
...
@@ -99,9 +100,15 @@ print('Mpc Training of Epoch={} Batch_size={}, epoch_cost={:.4f} s'
.
format
(
epoch_num
,
BATCH_SIZE
,
(
end_time
-
start_time
)))
# prediction
mpc_infer_data_dir
=
"./mpc_infer_data/"
if
not
os
.
path
.
exists
(
mpc_infer_data_dir
):
os
.
mkdir
(
mpc_infer_data_dir
)
try
:
os
.
mkdir
(
mpc_infer_data_dir
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
prediction_file
=
mpc_infer_data_dir
+
"mnist_debug_prediction.part{}"
.
format
(
role
)
if
os
.
path
.
exists
(
prediction_file
):
os
.
remove
(
prediction_file
)
...
...
python/paddle_fl/mpc/examples/logistic_with_mnist/train_fc_softmax.py
浏览文件 @
13cba8d8
...
...
@@ -17,6 +17,8 @@ MNIST CNN Demo (LeNet5)
import
sys
import
os
import
errno
import
numpy
as
np
import
time
import
logging
...
...
@@ -91,7 +93,12 @@ def infer():
"""
mpc_infer_data_dir
=
"./mpc_infer_data/"
if
not
os
.
path
.
exists
(
mpc_infer_data_dir
):
os
.
mkdir
(
mpc_infer_data_dir
)
try
:
os
.
mkdir
(
mpc_infer_data_dir
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
prediction_file
=
mpc_infer_data_dir
+
"mnist_debug_prediction"
prediction_file_part
=
prediction_file
+
".part{}"
.
format
(
role
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录