Showing 11,634 of 11,634 total issues
Avoid deeply nested control flow statements. Open
if use_explicit_padding:
net = _fixed_padding(net, conv_def.kernel)
net = slim.conv2d(net, depth(conv_def.depth), conv_def.kernel,
Avoid deeply nested control flow statements. Open
if end_point == final_endpoint:
return net, end_points
Avoid deeply nested control flow statements. Open
if not num_classes:
return net, end_points
# 1 x 1 x 1536
net = slim.dropout(net, dropout_keep_prob, scope='Dropout_1b')
Avoid deeply nested control flow statements. Open
with self.test_session() as sess:
tf.set_random_seed(0)
inputs = create_test_input(1, height, width, 3)
# Subsampling at the last unit of the block.
Function episode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def episode(self):
"""Episode data.
Returns:
observations: a tuple with one element. This element is a numpy array of
- 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
Avoid deeply nested control flow statements. Open
if not display_str:
display_str = '{}%'.format(int(100*scores[i]))
else:
display_str = '{}: {}%'.format(display_str, int(100*scores[i]))
box_to_display_str_map[box].append(display_str)
Avoid deeply nested control flow statements. Open
if use_explicit_padding:
net = _fixed_padding(net, conv_def.kernel, layer_rate)
net = slim.separable_conv2d(net, None, conv_def.kernel,
Avoid deeply nested control flow statements. Open
if end_point == final_endpoint:
return net, end_points
else:
Function inception_resnet_v2_base
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def inception_resnet_v2_base(inputs,
Function _conv
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _conv(self, name, x, filter_size, in_filters, out_filters, strides):
Function _add_gradients_summaries
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _add_gradients_summaries(grads_and_vars):
"""Add histogram summaries to gradients.
Note: The summaries are also added to the SUMMARIES collection.
- 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 log_mel_spectrogram
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def log_mel_spectrogram(data,
Avoid deeply nested control flow statements. Open
if end_point == final_endpoint:
return net, end_points
Function inception_resnet_v2_arg_scope
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def inception_resnet_v2_arg_scope(
Function preprocess_for_train
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def preprocess_for_train(image, height, width, bbox,
fast_mode=True,
scope=None,
add_image_summaries=True):
"""Distort one image for training a network.
- 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
Avoid deeply nested control flow statements. Open
if kernel_size.is_fully_defined():
net = slim.avg_pool2d(net, kernel_size, padding='VALID',
scope='AvgPool_1a')
else:
net = tf.reduce_mean(
Avoid deeply nested control flow statements. Open
if clone_loss is not None:
clones_losses.append(clone_loss)
# Only use regularization_losses for the first clone
regularization_losses = None
Function preprocess_image
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def preprocess_image(image, output_height, output_width, is_training=False,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function discriminator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def discriminator(inputs,