Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
94eace54
Commit
94eace54
authored
Oct 17, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] restructure main function
parent
610bd283
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+13
-13
No files found.
examples/FasterRCNN/train.py
View file @
94eace54
...
@@ -253,26 +253,26 @@ if __name__ == '__main__':
...
@@ -253,26 +253,26 @@ if __name__ == '__main__':
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
if
args
.
datadir
:
if
args
.
datadir
:
config
.
BASEDIR
=
args
.
datadir
config
.
BASEDIR
=
args
.
datadir
print_config
()
if
args
.
gpu
:
if
args
.
gpu
:
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
args
.
gpu
os
.
environ
[
'CUDA_VISIBLE_DEVICES'
]
=
args
.
gpu
if
args
.
visualize
:
if
args
.
visualize
or
args
.
evaluate
or
args
.
predict
:
assert
args
.
load
assert
args
.
load
visualize
(
args
.
load
)
print_config
(
)
elif
args
.
evaluate
is
not
Non
e
:
if
args
.
visualiz
e
:
assert
args
.
evaluate
.
endswith
(
'.json'
)
visualize
(
args
.
load
)
assert
args
.
load
elif
args
.
evaluate
:
# autotune is too slow for inference
assert
args
.
evaluate
.
endswith
(
'.json'
)
os
.
environ
[
'TF_CUDNN_USE_AUTOTUNE'
]
=
'0'
# autotune is too slow for inference
offline_evaluate
(
args
.
load
,
args
.
evaluate
)
os
.
environ
[
'TF_CUDNN_USE_AUTOTUNE'
]
=
'0'
elif
args
.
predict
is
not
None
:
offline_evaluate
(
args
.
load
,
args
.
evaluate
)
COCODetection
(
config
.
BASEDIR
,
'train2014'
)
# to load the class names
elif
args
.
predict
:
assert
args
.
load
COCODetection
(
config
.
BASEDIR
,
'train2014'
)
# to load the class names into caches
predict
(
args
.
load
,
args
.
predict
)
predict
(
args
.
load
,
args
.
predict
)
else
:
else
:
logger
.
set_logger_dir
(
args
.
logdir
)
logger
.
set_logger_dir
(
args
.
logdir
)
print_config
()
stepnum
=
300
stepnum
=
300
warmup_epoch
=
max
(
math
.
ceil
(
500.0
/
stepnum
),
5
)
warmup_epoch
=
max
(
math
.
ceil
(
500.0
/
stepnum
),
5
)
factor
=
get_batch_factor
()
factor
=
get_batch_factor
()
...
...
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