Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221cb0332
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221cb0332
Commits
a8687103
Commit
a8687103
authored
3 years ago
by
zhaoting
Browse files
Options
Downloads
Patches
Plain Diff
adapt 1p with mobilenetv3
parent
f10e2d71
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
official/cv/mobilenetv3/scripts/run_train.sh
+12
-3
12 additions, 3 deletions
official/cv/mobilenetv3/scripts/run_train.sh
official/cv/mobilenetv3/train.py
+1
-1
1 addition, 1 deletion
official/cv/mobilenetv3/train.py
with
13 additions
and
4 deletions
official/cv/mobilenetv3/scripts/run_train.sh
+
12
−
3
View file @
a8687103
...
...
@@ -46,11 +46,20 @@ run_gpu()
cd
../train
||
exit
export
CUDA_VISIBLE_DEVICES
=
"
$3
"
mpirun
-n
$2
--allow-run-as-root
--output-filename
log_output
--merge-stderr-to-stdout
\
python
${
BASEPATH
}
/../train.py
\
if
[
$2
-eq
1
]
;
then
python
${
BASEPATH
}
/../train.py
\
--dataset_path
=
$4
\
--device_target
=
$1
\
&> ../train.log &
# dataset train folder
--run_distribute
=
False
\
&> ../train.log &
else
mpirun
-n
$2
--allow-run-as-root
--output-filename
log_output
--merge-stderr-to-stdout
\
python
${
BASEPATH
}
/../train.py
\
--dataset_path
=
$4
\
--device_target
=
$1
\
--run_distribute
=
True
\
&> ../train.log &
# dataset train folder
fi
;
}
run_cpu
()
...
...
This diff is collapsed.
Click to expand it.
official/cv/mobilenetv3/train.py
+
1
−
1
View file @
a8687103
...
...
@@ -49,7 +49,7 @@ parser = argparse.ArgumentParser(description='Image classification')
parser
.
add_argument
(
'
--dataset_path
'
,
type
=
str
,
default
=
None
,
help
=
'
Dataset path
'
)
parser
.
add_argument
(
'
--pre_trained
'
,
type
=
str
,
default
=
None
,
help
=
'
Pretrained checkpoint path
'
)
parser
.
add_argument
(
'
--device_target
'
,
type
=
str
,
default
=
"
GPU
"
,
help
=
'
run device_target
'
)
parser
.
add_argument
(
'
--run_distribute
'
,
type
=
ast
.
literal_eval
,
default
=
Tru
e
,
help
=
'
Run distribute
'
)
parser
.
add_argument
(
'
--run_distribute
'
,
type
=
ast
.
literal_eval
,
default
=
Fals
e
,
help
=
'
Run distribute
'
)
args_opt
=
parser
.
parse_args
()
if
args_opt
.
device_target
==
"
GPU
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment