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
6aa4328b
Commit
6aa4328b
authored
May 14, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpn total loss
parent
c648e3ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
examples/FasterRCNN/model.py
examples/FasterRCNN/model.py
+1
-1
examples/FasterRCNN/train.py
examples/FasterRCNN/train.py
+6
-1
No files found.
examples/FasterRCNN/model.py
View file @
6aa4328b
...
...
@@ -96,7 +96,7 @@ def rpn_losses(anchor_labels, anchor_boxes, label_logits, box_logits):
summaries
.
extend
([
precision
,
recall
])
add_moving_summary
(
*
summaries
)
placeholder
=
1
.
placeholder
=
0.
# Per-level loss summaries in FPN may appear lower. But the sum should be OK
.
label_loss
=
tf
.
nn
.
sigmoid_cross_entropy_with_logits
(
labels
=
tf
.
to_float
(
valid_anchor_labels
),
logits
=
valid_label_logits
)
label_loss
=
tf
.
reduce_sum
(
label_loss
)
*
(
1.
/
config
.
RPN_BATCH_PER_IM
)
...
...
examples/FasterRCNN/train.py
View file @
6aa4328b
...
...
@@ -389,7 +389,11 @@ class ResNetFPNModel(DetectionModel):
'fastrcnn'
,
all_rois
,
config
.
FASTRCNN_FC_HEAD_DIM
,
config
.
NUM_CLASS
)
if
is_training
:
# rpn_losses = ..
with
tf
.
name_scope
(
'rpn_losses'
):
rpn_total_label_loss
=
tf
.
add_n
(
rpn_loss_collection
[::
2
],
name
=
'label_loss'
)
rpn_total_box_loss
=
tf
.
add_n
(
rpn_loss_collection
[
1
::
2
],
name
=
'box_loss'
)
add_moving_summary
(
rpn_total_box_loss
,
rpn_total_label_loss
)
# fastrcnn loss:
matched_gt_boxes
=
tf
.
gather
(
gt_boxes
,
fg_inds_wrt_gt
)
...
...
@@ -579,6 +583,7 @@ if __name__ == '__main__':
PeriodicCallback
(
ModelSaver
(
max_to_keep
=
10
,
keep_checkpoint_every_n_hours
=
1
),
every_k_epochs
=
20
),
SessionRunTimeout
(
60000
),
# 1 minute timeout
# linear warmup
ScheduledHyperParamSetter
(
'learning_rate'
,
warmup_schedule
,
interp
=
'linear'
,
step_based
=
True
),
...
...
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