Showing 72 of 97 total issues
Function _queue_management_worker
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _queue_management_worker(executor_reference,
Function conv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def conv2d(in_channels,out_channels,kernel_size=3,coords=False,dilation=1,**kwargs):
Function make_layers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def make_layers(cfg, batch_norm=False):
layers = list()
in_channels = 3
for v in cfg:
if v == 'M':
- 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 __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, inplanes, planes, groups, stride=1, downsample=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, pad_type='reflect', filt_size=3, stride=2, channels=None, pad_off=0):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, perform_trial, config_spec={},
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, inplanes, planes, groups, stride=1, downsample=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, pad_type='reflect', filt_size=3, stride=2, channels=None, pad_off=0):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, x_dim, y_dim, with_r, *args, **kwargs):
Function _wide_layer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _wide_layer(self, block, planes, num_blocks, drop_rate, stride):
Function _make_layer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _make_layer(self, block, planes, groups, blocks, stride=1):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, *args, cons_weight=.3, advEps=32, entMin=True, **kwargs):
Function _make_layer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _make_layer(self, block, planes, groups, blocks, stride=1):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, in_channels, out_channels, kernel_size, with_r=False, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, inplanes,k=16,N=20,drop_rate=0,coords=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, log_dir = None,comment='', no_print=False, ema_com=0, **kwargs):
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1,bias=True, eps=1e-2, n_iter=5, momentum=0.1, mode=4, num_groups=16,debug=False):
# mode 1: remove channel correlation then pixel correlation
# mode 2: only remove pixel correlation
# mode 3: only channel correlation
# mode 4: remove channel correlation and pixel correlation together
- 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 _make_layer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _make_layer(self, block, planes, groups, blocks, stride=1):
downsample = None
if stride != 1 or self.inplanes != block.out_channels(planes, groups):
if self.downsample_mode == 'basic' or stride == 1:
downsample = nn.Sequential(
- 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 __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, pad_type='reflect', filt_size=3, stride=2, channels=None, pad_off=0):
super(Downsample, self).__init__()
self.filt_size = filt_size
self.pad_off = pad_off
self.pad_sizes = [int(1.*(filt_size-1)/2), int(np.ceil(1.*(filt_size-1)/2)), int(1.*(filt_size-1)/2), int(np.ceil(1.*(filt_size-1)/2))]
- 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 __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, pad_type='reflect', filt_size=3, stride=2, channels=None, pad_off=0):
super(Downsample1D, self).__init__()
self.filt_size = filt_size
self.pad_off = pad_off
self.pad_sizes = [int(1. * (filt_size - 1) / 2), int(np.ceil(1. * (filt_size - 1) / 2))]
- 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"