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
3aab66f1
Commit
3aab66f1
authored
Sep 04, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MaskRCNN] fix evaluation period
parent
e943200b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
examples/FasterRCNN/config.py
examples/FasterRCNN/config.py
+1
-1
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+7
-7
No files found.
examples/FasterRCNN/config.py
View file @
3aab66f1
...
...
@@ -114,7 +114,7 @@ _C.TRAIN.STEPS_PER_EPOCH = 500
# Therefore, there is *no need* to modify the config if you only change the number of GPUs.
# LR_SCHEDULE = [120000, 160000, 180000] # "1x" schedule in detectron
_C
.
TRAIN
.
LR_SCHEDULE
=
[
240000
,
320000
,
360000
]
# "2x" schedule in detectron
_C
.
TRAIN
.
NUM_EVALS
=
20
# number of evaluations to run during training
_C
.
TRAIN
.
EVAL_PERIOD
=
25
# period (epochs) to run eva
# preprocessing --------------------
# Alternative old (worse & faster) setting: 600, 1024
...
...
examples/FasterRCNN/train.py
View file @
3aab66f1
...
...
@@ -430,14 +430,14 @@ class EvalCallback(Callback):
return
lambda
img
:
detect_one_image
(
img
,
graph_func
)
def
_before_train
(
self
):
num_eval
=
cfg
.
TRAIN
.
NUM_EVALS
interval
=
max
(
self
.
trainer
.
max_epoch
//
(
num_eval
+
1
),
1
)
self
.
epochs_to_eval
=
set
([
interval
*
k
for
k
in
range
(
1
,
num_eval
+
1
)])
eval_period
=
cfg
.
TRAIN
.
EVAL_PERIOD
self
.
epochs_to_eval
=
set
()
for
k
in
itertools
.
count
(
1
):
if
k
*
eval_period
>
self
.
trainer
.
max_epoch
:
break
self
.
epochs_to_eval
.
add
(
k
*
eval_period
)
self
.
epochs_to_eval
.
add
(
self
.
trainer
.
max_epoch
)
if
len
(
self
.
epochs_to_eval
)
<
15
:
logger
.
info
(
"[EvalCallback] Will evaluate at epoch "
+
str
(
sorted
(
self
.
epochs_to_eval
)))
else
:
logger
.
info
(
"[EvalCallback] Will evaluate every {} epochs"
.
format
(
interval
))
logger
.
info
(
"[EvalCallback] Will evaluate every {} epochs"
.
format
(
eval_period
))
def
_eval
(
self
):
logdir
=
args
.
logdir
...
...
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