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
067d35f9
Commit
067d35f9
authored
Nov 26, 2020
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 344465468
parent
ff5b647a
Changes
1
Show 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 @
067d35f9
...
@@ -330,7 +330,6 @@ class OlnRpnIoULoss(object):
...
@@ -330,7 +330,6 @@ class OlnRpnIoULoss(object):
(
gt_left
+
gt_right
)
*
(
gt_top
+
gt_bottom
)
-
(
gt_left
+
gt_right
)
*
(
gt_top
+
gt_bottom
)
-
inter_area
)
inter_area
)
iou
=
inter_area
/
(
union_area
+
1e-8
)
iou
=
inter_area
/
(
union_area
+
1e-8
)
iou
=
tf
.
where
(
mask
,
iou
,
tf
.
ones_like
(
iou
))
mask_
=
tf
.
cast
(
mask
,
tf
.
float32
)
mask_
=
tf
.
cast
(
mask
,
tf
.
float32
)
iou
=
tf
.
clip_by_value
(
iou
,
clip_value_min
=
1e-8
,
clip_value_max
=
1.0
)
iou
=
tf
.
clip_by_value
(
iou
,
clip_value_min
=
1e-8
,
clip_value_max
=
1.0
)
neg_log_iou
=
-
tf
.
math
.
log
(
iou
)
neg_log_iou
=
-
tf
.
math
.
log
(
iou
)
...
@@ -498,7 +497,7 @@ class OlnBoxScoreLoss(object):
...
@@ -498,7 +497,7 @@ class OlnBoxScoreLoss(object):
mask
=
tf
.
cast
(
mask
,
dtype
=
tf
.
float32
)
mask
=
tf
.
cast
(
mask
,
dtype
=
tf
.
float32
)
score_loss
=
self
.
_l1_loss
(
score_targets
,
score_outputs
,
score_loss
=
self
.
_l1_loss
(
score_targets
,
score_outputs
,
sample_weight
=
mask
)
sample_weight
=
mask
)
score_loss
/=
num_valid
score_loss
/=
(
num_valid
+
1e-10
)
return
score_loss
return
score_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