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
ResNet50_tensorflow
Commits
0e9d5840
"vscode:/vscode.git/clone" did not exist on "d55e5cc9039b8107cace43bc7c28ea62b266c656"
Unverified
Commit
0e9d5840
authored
Jul 31, 2020
by
Srihari Humbarwadi
Committed by
GitHub
Jul 31, 2020
Browse files
Fixed typos in losses.py
parent
df7e66d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
official/vision/detection/modeling/losses.py
official/vision/detection/modeling/losses.py
+1
-2
No files found.
official/vision/detection/modeling/losses.py
View file @
0e9d5840
...
@@ -449,7 +449,7 @@ class RetinanetBoxLoss(object):
...
@@ -449,7 +449,7 @@ class RetinanetBoxLoss(object):
num_positives: number of positive examples in the minibatch.
num_positives: number of positive examples in the minibatch.
Returns:
Returns:
an integ
a
r tensor representing total box regression loss.
an integ
e
r tensor representing total box regression loss.
"""
"""
# Sums all positives in a batch for normalization and avoids zero
# Sums all positives in a batch for normalization and avoids zero
# num_positives_sum, which would lead to inf loss during training
# num_positives_sum, which would lead to inf loss during training
...
@@ -457,7 +457,6 @@ class RetinanetBoxLoss(object):
...
@@ -457,7 +457,6 @@ class RetinanetBoxLoss(object):
box_losses
=
[]
box_losses
=
[]
for
level
in
box_outputs
.
keys
():
for
level
in
box_outputs
.
keys
():
# Onehot encoding for classification labels.
box_targets_l
=
labels
[
level
]
box_targets_l
=
labels
[
level
]
box_losses
.
append
(
box_losses
.
append
(
self
.
box_loss
(
box_outputs
[
level
],
box_targets_l
,
num_positives_sum
))
self
.
box_loss
(
box_outputs
[
level
],
box_targets_l
,
num_positives_sum
))
...
...
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