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
634079da
Commit
634079da
authored
Sep 10, 2021
by
Vishnu Banna
Browse files
model params
parent
0c1682cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
official/vision/beta/projects/yolo/losses/yolo_loss.py
official/vision/beta/projects/yolo/losses/yolo_loss.py
+6
-6
No files found.
official/vision/beta/projects/yolo/losses/yolo_loss.py
View file @
634079da
...
@@ -236,8 +236,7 @@ def grad_sigmoid(values):
...
@@ -236,8 +236,7 @@ def grad_sigmoid(values):
class
DarknetLoss
(
YoloLossBase
):
class
DarknetLoss
(
YoloLossBase
):
"""This class implements the full logic for the standard Yolo models
"""This class implements the full logic for the standard Yolo models."""
encompassing Yolov3, Yolov4, and Yolo-Tiny."""
def
_build_per_path_attributes
(
self
):
def
_build_per_path_attributes
(
self
):
"""Paramterization of pair wise search and grid generators for box
"""Paramterization of pair wise search and grid generators for box
...
@@ -253,7 +252,8 @@ class DarknetLoss(YoloLossBase):
...
@@ -253,7 +252,8 @@ class DarknetLoss(YoloLossBase):
return
return
def
_compute_loss
(
self
,
true_counts
,
inds
,
y_true
,
boxes
,
classes
,
y_pred
):
def
_compute_loss
(
self
,
true_counts
,
inds
,
y_true
,
boxes
,
classes
,
y_pred
):
"""Per FPN path loss computation logic."""
"""Per FPN path loss computation logic used for Yolov3, Yolov4, and
Yolo-Tiny."""
if
self
.
_box_type
==
"scaled"
:
if
self
.
_box_type
==
"scaled"
:
# Darknet Model Propagates a sigmoid once in back prop so we replicate
# Darknet Model Propagates a sigmoid once in back prop so we replicate
# that behaviour
# that behaviour
...
@@ -386,8 +386,7 @@ class DarknetLoss(YoloLossBase):
...
@@ -386,8 +386,7 @@ class DarknetLoss(YoloLossBase):
class
ScaledLoss
(
YoloLossBase
):
class
ScaledLoss
(
YoloLossBase
):
"""This class implements the full logic for the scaled Yolo models
"""This class implements the full logic for the scaled Yolo models. """
encompassing Yolov4-csp, Yolov4-Large, and Yolov5."""
def
_build_per_path_attributes
(
self
):
def
_build_per_path_attributes
(
self
):
"""Paramterization of pair wise search and grid generators for box
"""Paramterization of pair wise search and grid generators for box
...
@@ -403,7 +402,8 @@ class ScaledLoss(YoloLossBase):
...
@@ -403,7 +402,8 @@ class ScaledLoss(YoloLossBase):
return
return
def
_compute_loss
(
self
,
true_counts
,
inds
,
y_true
,
boxes
,
classes
,
y_pred
):
def
_compute_loss
(
self
,
true_counts
,
inds
,
y_true
,
boxes
,
classes
,
y_pred
):
"""Per FPN path loss computation logic."""
"""Per FPN path loss computation logic Yolov4-csp, Yolov4-Large, and
Yolov5."""
# Generate shape constants.
# Generate shape constants.
shape
=
tf
.
shape
(
true_counts
)
shape
=
tf
.
shape
(
true_counts
)
batch_size
,
width
,
height
,
num
=
shape
[
0
],
shape
[
1
],
shape
[
2
],
shape
[
3
]
batch_size
,
width
,
height
,
num
=
shape
[
0
],
shape
[
1
],
shape
[
2
],
shape
[
3
]
...
...
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