Commit 634079da authored by Vishnu Banna's avatar Vishnu Banna
Browse files

model params

parent 0c1682cd
...@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment