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
a0904210
Commit
a0904210
authored
Sep 24, 2021
by
Vishnu Banna
Browse files
address comments
parent
cefcb87b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
official/vision/beta/projects/yolo/ops/loss_utils.py
official/vision/beta/projects/yolo/ops/loss_utils.py
+2
-3
No files found.
official/vision/beta/projects/yolo/ops/loss_utils.py
View file @
a0904210
...
...
@@ -536,8 +536,8 @@ def _anchor_free_scale_boxes(encoded_boxes,
# build a scaling tensor to get the offset of th ebox relative to the image
scaler
=
tf
.
convert_to_tensor
([
height
,
width
,
height
,
width
])
scale_down
=
lambda
x
,
y
:
x
/
y
scale_up
=
lambda
x
,
y
:
x
*
y
scale_down
=
lambda
x
,
y
:
x
/
tf
.
cast
(
y
,
x
.
dtype
)
scale_up
=
lambda
x
,
y
:
x
*
tf
.
cast
(
y
,
x
.
dtype
)
if
darknet
:
scale_down
=
tf
.
grad_pass_through
(
scale_down
)
scale_up
=
tf
.
grad_pass_through
(
scale_up
)
...
...
@@ -558,7 +558,6 @@ def _anchor_free_scale_boxes(encoded_boxes,
pred_box
=
scale_down
(
scaled_box
,
(
scaler
*
stride
))
return
(
scaler
,
scaled_box
,
pred_box
)
def
get_predicted_box
(
width
,
height
,
encoded_boxes
,
...
...
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