Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
OneFlow-Benchmark
提交
d7ae4c1f
O
OneFlow-Benchmark
项目概览
Oneflow-Inc
/
OneFlow-Benchmark
上一次同步 接近 3 年
通知
1
Star
92
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneFlow-Benchmark
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d7ae4c1f
编写于
4月 01, 2020
作者:
S
ShawnXuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support io test
上级
1fe2f271
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
63 addition
and
0 deletion
+63
-0
cnn_e2e/ofrecord_util.py
cnn_e2e/ofrecord_util.py
+35
-0
io_test.sh
io_test.sh
+28
-0
未找到文件。
cnn_e2e/ofrecord_util.py
浏览文件 @
d7ae4c1f
...
...
@@ -109,3 +109,38 @@ def load_imagenet_for_training2(args):
mean
=
args
.
rgb_mean
,
std
=
args
.
rgb_std
,
output_dtype
=
flow
.
float
)
print
(
normal
.
shape
)
return
label
,
normal
if
__name__
==
"__main__"
:
import
os
import
config
as
configs
from
util
import
Summary
,
InitNodes
,
Metric
from
job_function_util
import
get_val_config
parser
=
configs
.
get_parser
()
args
=
parser
.
parse_args
()
configs
.
print_args
(
args
)
flow
.
config
.
gpu_device_num
(
args
.
gpu_num_per_node
)
flow
.
config
.
enable_debug_mode
(
True
)
@
flow
.
function
(
get_val_config
(
args
))
def
IOTest
():
if
args
.
train_data_dir
:
assert
os
.
path
.
exists
(
args
.
train_data_dir
)
print
(
"Loading data from {}"
.
format
(
args
.
train_data_dir
))
(
labels
,
images
)
=
load_imagenet_for_training
(
args
)
#(labels, images) = load_imagenet_for_training2(args)
else
:
print
(
"Loading synthetic data."
)
(
labels
,
images
)
=
load_synthetic
(
args
)
predictions
=
labels
outputs
=
{
"predictions"
:
predictions
,
"labels"
:
labels
}
return
outputs
total_device_num
=
args
.
num_nodes
*
args
.
gpu_num_per_node
train_batch_size
=
total_device_num
*
args
.
batch_size_per_device
summary
=
Summary
(
args
.
log_dir
,
args
,
filename
=
'io_test.csv'
)
metric
=
Metric
(
desc
=
'io_test'
,
calculate_batches
=
args
.
loss_print_every_n_iter
,
summary
=
summary
,
save_summary_steps
=
args
.
loss_print_every_n_iter
,
batch_size
=
train_batch_size
)
for
i
in
range
(
1000
):
IOTest
().
async_get
(
metric
.
metric_cb
(
0
,
i
))
io_test.sh
0 → 100755
浏览文件 @
d7ae4c1f
rm
-rf
core.
*
#DATA_ROOT=/mnt/13_nfs/xuan/ImageNet/ofrecord
DATA_ROOT
=
/dataset/ImageNet/ofrecord
#DATA_ROOT=/dataset/imagenet-mxnet
#python3 cnn_benchmark/of_cnn_train_val.py \
#gdb --args \
#nvprof -f -o resnet.nvvp \
python3 cnn_e2e/ofrecord_util.py
\
--train_data_dir
=
$DATA_ROOT
/train
\
--train_data_part_num
=
256
\
--val_data_dir
=
$DATA_ROOT
/validation
\
--val_data_part_num
=
256
\
--num_nodes
=
1
\
--node_ips
=
'11.11.1.13,11.11.1.14'
\
--gpu_num_per_node
=
4
\
--optimizer
=
"momentum-cosine-decay"
\
--learning_rate
=
0.256
\
--loss_print_every_n_iter
=
20
\
--batch_size_per_device
=
64
\
--val_batch_size_per_device
=
125
\
--model
=
"resnet50"
#--use_fp16 true \
#--weight_l2=3.0517578125e-05 \
#--num_examples=1024 \
#--optimizer="momentum-decay" \
#--data_dir="/mnt/13_nfs/xuan/ImageNet/ofrecord/train"
#--data_dir="/mnt/dataset/xuan/ImageNet/ofrecord/train"
#--warmup_iter_num=10000 \
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录