Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
SSD_pytorch
Commits
58488874
Commit
58488874
authored
Oct 26, 2024
by
xinghao
Browse files
Update test.py
parent
61d5313f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
test.py
test.py
+3
-0
No files found.
test.py
View file @
58488874
...
...
@@ -35,6 +35,7 @@ def main():
type
=
str
,
)
parser
.
add_argument
(
"--local_rank"
,
type
=
int
,
default
=
0
)
parser
.
add_argument
(
'--local-rank'
,
type
=
int
,
default
=
0
)
parser
.
add_argument
(
"--ckpt"
,
help
=
"The path to the checkpoint for test, default is the latest checkpoint."
,
...
...
@@ -51,6 +52,8 @@ def main():
nargs
=
argparse
.
REMAINDER
,
)
args
=
parser
.
parse_args
()
if
'LOCAL_RANK'
not
in
os
.
environ
:
os
.
environ
[
'LOCAL_RANK'
]
=
str
(
args
.
local_rank
)
num_gpus
=
int
(
os
.
environ
[
"WORLD_SIZE"
])
if
"WORLD_SIZE"
in
os
.
environ
else
1
distributed
=
num_gpus
>
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment