"git@developer.sourcefind.cn:OpenDAS/torch-cluster.git" did not exist on "b992389e64a30859ed01196501523bf18d142db2"
Unverified Commit 404d24b0 authored by Anirudh Vegesana's avatar Anirudh Vegesana Committed by GitHub
Browse files

YOLO Family: Linting (#10027)



* YOLO Family: Updated model (#9923)

* Update YOLO model

* Fix some docstrings

* Fix docstrings

* Address some of Dr. Davis' changes

* Give descriptive names to the test cases

* Fix bugs

* Fix YOLO head imports

* docstring and variable name updates

* docstring and variable name updates

* docstring and variable name updates
Co-authored-by: default avatarvishnubanna <banna3vishnu@gmail.com>
Co-authored-by: default avatarVishnu Banna <43182884+vishnubanna@users.noreply.github.com>

* disclaimer

* Fix some PyLint errors
Co-authored-by: default avatarvishnubanna <banna3vishnu@gmail.com>
Co-authored-by: default avatarVishnu Banna <43182884+vishnubanna@users.noreply.github.com>
parent 725b8c8c
...@@ -331,13 +331,13 @@ class YoloPAN(tf.keras.layers.Layer): ...@@ -331,13 +331,13 @@ class YoloPAN(tf.keras.layers.Layer):
Args: Args:
minimum_depth: `int` depth of the smallest branch of the FPN. minimum_depth: `int` depth of the smallest branch of the FPN.
inputs: `dict[str, tf.InputSpec]` of the shape of input args as a dictionary of inputs: `dict[str, tf.InputSpec]` of the shape of input args as a
lists. dictionary of lists.
Returns: Returns:
The unscaled depths of the FPN branches. The unscaled depths of the FPN branches.
""" """
depths = [] depths = []
if len(inputs.keys()) > 3 or self._fpn_filter_scale > 1: if len(inputs.keys()) > 3 or self._fpn_filter_scale > 1:
for i in range(self._min_level, self._max_level + 1): for i in range(self._min_level, self._max_level + 1):
...@@ -386,8 +386,8 @@ class YoloDecoder(tf.keras.Model): ...@@ -386,8 +386,8 @@ class YoloDecoder(tf.keras.Model):
kernel_regularizer=None, kernel_regularizer=None,
bias_regularizer=None, bias_regularizer=None,
**kwargs): **kwargs):
"""Yolo Decoder initialization function. A unified model that ties all decoder """Yolo Decoder initialization function. A unified model that ties all
components into a conditionally build YOLO decder. decoder components into a conditionally build YOLO decoder.
Args: Args:
input_specs: `dict[str, tf.InputSpec]`: input specs of each of the inputs input_specs: `dict[str, tf.InputSpec]`: input specs of each of the inputs
...@@ -409,7 +409,7 @@ class YoloDecoder(tf.keras.Model): ...@@ -409,7 +409,7 @@ class YoloDecoder(tf.keras.Model):
zero. zero.
kernel_initializer: kernel_initializer for convolutional layers. kernel_initializer: kernel_initializer for convolutional layers.
kernel_regularizer: tf.keras.regularizers.Regularizer object for Conv2D. kernel_regularizer: tf.keras.regularizers.Regularizer object for Conv2D.
bias_regularizer: tf.keras.regularizers.Regularizer object for Conv2d. bias_regularizer: tf.keras.regularizers.Regularizer object for Conv2D.
**kwargs: keyword arguments to be passed. **kwargs: keyword arguments to be passed.
""" """
......
...@@ -1152,8 +1152,8 @@ class SAM(tf.keras.layers.Layer): ...@@ -1152,8 +1152,8 @@ class SAM(tf.keras.layers.Layer):
def call(self, inputs, training=None): def call(self, inputs, training=None):
if self._use_pooling: if self._use_pooling:
depth_max = tf.reduce_max(inputs, axis=-1, keep_dims=True) depth_max = tf.reduce_max(inputs, axis=-1, keepdims=True)
depth_avg = tf.reduce_mean(inputs, axis=-1, keep_dims=True) depth_avg = tf.reduce_mean(inputs, axis=-1, keepdims=True)
input_maps = tf.concat([depth_avg, depth_max], axis=-1) input_maps = tf.concat([depth_avg, depth_max], axis=-1)
else: else:
input_maps = inputs input_maps = inputs
...@@ -1545,7 +1545,7 @@ class DarkRouteProcess(tf.keras.layers.Layer): ...@@ -1545,7 +1545,7 @@ class DarkRouteProcess(tf.keras.layers.Layer):
elif layer == 'spp': elif layer == 'spp':
self.layers.append(self._spp(self._filters, dark_conv_args)) self.layers.append(self._spp(self._filters, dark_conv_args))
elif layer == 'sam': elif layer == 'sam':
self.layers.append(self._sam(-1, _args)) self.layers.append(self._sam(-1, dark_conv_args))
self._lim = len(self.layers) self._lim = len(self.layers)
super().build(input_shape) super().build(input_shape)
......
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