Commit 5dfe788d authored by anivegesana's avatar anivegesana
Browse files

Merge branch 'linting2' into linting

parents 725b8c8c 9dd1c2c0
...@@ -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