Skip to content
Snippets Groups Projects
Commit 53b667b5 authored by willzhang4a58's avatar willzhang4a58
Browse files

alexnet benchmark use imagenet_227

parent c6ac67d5
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,6 @@ batch_size: 1024
gpu num | time (one batch)
:-------| :-------------
1 | 538ms
2 | 275ms
4 | 214ms
1 | 541ms
2 | 282ms
4 | 207ms
op {
name: "decode"
decode_ofrecord_conf {
data_dir: "/dataset/imagenet/train/32"
data_dir: "/dataset/imagenet_227/train/32/"
blob {
name: "encoded"
data_type: kFloat
......@@ -12,12 +12,6 @@ op {
}
encode_case {
jpeg {
preprocess {
resize {
width: 227
height: 227
}
}
}
}
}
......
......@@ -55,6 +55,16 @@ def SubmitJob(job_conf, oneflow_path, workdir):
for machine in job_conf.resource.machine:
SubmitJobToOneMachine(machine, job_conf, oneflow_path, workdir)
def FindOneflowPathInEnv():
for path_dir in os.getenv("PATH").split(":"):
try:
filenames = os.listdir(path_dir)
if "oneflow" in filenames:
return os.path.join(path_dir, "oneflow")
except os.error:
pass
return ""
if __name__ == "__main__":
if len(sys.argv) == 1:
PrintHelpMessage()
......@@ -68,7 +78,9 @@ if __name__ == "__main__":
else:
PrintHelpMessage()
oneflow_path = os.path.abspath(os.path.expanduser(oneflow_path))
assert os.path.isfile(oneflow_path)
if os.path.isfile(oneflow_path) == False:
oneflow_path = FindOneflowPathInEnv()
assert os.path.isfile(oneflow_path)
workdir = os.path.abspath(os.path.expanduser(workdir))
job_conf_path = sys.argv[-1]
if os.path.isfile(job_conf_path) == False:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment