tensorflow / addons
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 902 units with 10,030 lines of code in units (45.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (644 lines of code)
    • 55 simple units (2,014 lines of code)
    • 836 very simple units (7,372 lines of code)
0% | 0% | 6% | 20% | 73%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cc0% | 0% | 21% | 26% | 52%
py0% | 0% | 2% | 18% | 78%
h0% | 0% | 24% | 9% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorflow_addons/custom_ops0% | 0% | 22% | 24% | 53%
tensorflow_addons/seq2seq0% | 0% | 5% | 22% | 71%
build_deps/toolchains0% | 0% | 12% | 18% | 69%
tensorflow_addons/layers0% | 0% | 2% | 19% | 77%
tensorflow_addons/optimizers0% | 0% | 0% | 22% | 77%
tensorflow_addons/callbacks0% | 0% | 0% | 39% | 60%
tensorflow_addons/rnn0% | 0% | 0% | 17% | 82%
tensorflow_addons/utils0% | 0% | 0% | 22% | 77%
tensorflow_addons/metrics0% | 0% | 0% | 7% | 92%
ROOT0% | 0% | 0% | 28% | 71%
tensorflow_addons/testing0% | 0% | 0% | 74% | 25%
tensorflow_addons/activations0% | 0% | 0% | 20% | 80%
tools0% | 0% | 0% | 75% | 24%
tensorflow_addons/image0% | 0% | 0% | 4% | 95%
tensorflow_addons/text0% | 0% | 0% | 0% | 100%
tensorflow_addons/losses0% | 0% | 0% | 0% | 100%
tensorflow_addons0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def find_cuda_config()
in build_deps/toolchains/gpu/find_cuda_config.py
55 21 0
__global__ void ResamplerGrad2DKernel()
in tensorflow_addons/custom_ops/image/cc/kernels/resampler_ops_gpu.cu.cc
62 19 10
void operator()
in tensorflow_addons/custom_ops/image/cc/kernels/resampler_ops.cc
87 18 0
void operator()
in tensorflow_addons/custom_ops/image/cc/kernels/resampler_ops.cc
59 13 0
Status operator()
in tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op.cc
65 12 0
Status operator()
in tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op.cc
76 12 0
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void EuclideanDistanceTransformSample()
in tensorflow_addons/custom_ops/image/cc/kernels/euclidean_distance_transform_op.h
55 12 7
__global__ void Resampler2DKernel()
in tensorflow_addons/custom_ops/image/cc/kernels/resampler_ops_gpu.cu.cc
45 12 8
def call()
in tensorflow_addons/layers/multihead_attention.py
42 12 4
def body()
in tensorflow_addons/seq2seq/decoder.py
70 11 6
def call()
in tensorflow_addons/seq2seq/attention_wrapper.py
28 11 5
def initialize()
in tensorflow_addons/seq2seq/sampler.py
53 10 4
def build()
in tensorflow_addons/seq2seq/attention_wrapper.py
10 10 2
def setup_memory()
in tensorflow_addons/seq2seq/attention_wrapper.py
36 10 4
__global__ void Correlation_backward_input1()
in tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op_gpu.cu.cc
62 10 16
__global__ void Correlation_backward_input2()
in tensorflow_addons/custom_ops/layers/cc/kernels/correlation_cost_op_gpu.cu.cc
62 10 16
def call()
in tensorflow_addons/layers/crf.py
22 10 3
def _resource_apply_dense()
in tensorflow_addons/optimizers/yogi.py
63 10 3
def _resource_apply_sparse()
in tensorflow_addons/optimizers/yogi.py
67 10 4
def _compute_2d_sparsemax()
in tensorflow_addons/activations/sparsemax.py
25 10 1