Showing 11,634 of 11,634 total issues
Function initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(self, model: tf_keras.Model):
"""Loading pretrained checkpoint."""
if not self.task_config.init_checkpoint:
logging.info('Training from Scratch.')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_export_module
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_export_module(params: cfg.ExperimentConfig,
Function post_path_aggregation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def post_path_aggregation(self, loss, box_loss, conf_loss, class_loss,
Function call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call(self, inputs, training): # pytype: disable=signature-mismatch # overriding-parameter-count-checks
# call backbone network.
all_feats = self.backbone(inputs, training=training)
if self.use_original_backbone_features:
feats = all_feats[self.min_level:self.max_level + 1]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function argmax
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def argmax(input_tensor,
Function from_search_config
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def from_search_config(cls,
Function create_classification_export_module
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_classification_export_module(
Function post_path_aggregation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def post_path_aggregation(self, loss, box_loss, conf_loss, class_loss,
Function build_yolo_decoder
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_yolo_decoder(
input_specs: Mapping[str, tf.TensorShape],
model_config: hyperparams.Config,
l2_regularizer: Optional[tf_keras.regularizers.Regularizer] = None,
**kwargs) -> Union[None, tf_keras.Model, tf_keras.layers.Layer]:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(self, model: tf_keras.Model):
"""Loading pretrained checkpoint."""
if not self.task_config.init_checkpoint:
logging.info('Training from Scratch.')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_variable_group
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _get_variable_group(self, var, coefficients):
if self._variables_set:
# check which groups hold which varaibles, preset.
if _var_key(var) in self._wset:
return True, False, False
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function build
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build(self, input_shape):
dark_conv_args = {
'activation': self._activation,
'kernel_initializer': self._kernel_initializer,
'bias_initializer': self._bias_initializer,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function normalize_images
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def normalize_images(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function _compute_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compute_loss(self, true_counts, inds, y_true, boxes, classes, y_pred):
Function create_yolo_export_module
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_yolo_export_module(
Function run_export
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def run_export():
"""Exports TFLite with PTQ."""
export_config = get_export_config_from_flags()
model = export_util.build_experiment_model(
experiment_type=export_config.model_name)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function call
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def call(self, x, enc, caches, mask_self, mask_cross, training):
Function merge_boxes_with_multiple_labels
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def merge_boxes_with_multiple_labels(boxes: tf.Tensor,
classes: tf.Tensor,
confidences: tf.Tensor,
num_classes: int,
quantization_bins: int = 10000):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function add_seq_pos_emb
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_seq_pos_emb(