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
f7843c44
"vscode:/vscode.git/clone" did not exist on "465cdb842513eb910aa20fcedea1d2edd15dc7b7"
Commit
f7843c44
authored
Mar 10, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 300222585
parent
08f45dc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
official/vision/detection/modeling/losses.py
official/vision/detection/modeling/losses.py
+3
-1
No files found.
official/vision/detection/modeling/losses.py
View file @
f7843c44
...
@@ -465,7 +465,9 @@ class RetinanetBoxLoss(object):
...
@@ -465,7 +465,9 @@ class RetinanetBoxLoss(object):
# for instances, the regression targets of 512x512 input with 6 anchors on
# for instances, the regression targets of 512x512 input with 6 anchors on
# P3-P7 pyramid is about [0.1, 0.1, 0.2, 0.2].
# P3-P7 pyramid is about [0.1, 0.1, 0.2, 0.2].
normalizer
=
num_positives
*
4.0
normalizer
=
num_positives
*
4.0
mask
=
tf
.
not_equal
(
box_targets
,
0.0
)
mask
=
tf
.
cast
(
tf
.
not_equal
(
box_targets
,
0.0
),
dtype
=
tf
.
float32
)
box_targets
=
tf
.
expand_dims
(
box_targets
,
axis
=-
1
)
box_outputs
=
tf
.
expand_dims
(
box_outputs
,
axis
=-
1
)
box_loss
=
self
.
_huber_loss
(
box_targets
,
box_outputs
,
sample_weight
=
mask
)
box_loss
=
self
.
_huber_loss
(
box_targets
,
box_outputs
,
sample_weight
=
mask
)
box_loss
/=
normalizer
box_loss
/=
normalizer
return
box_loss
return
box_loss
...
...
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