facebookresearch / gan_of_gan
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 45 units with 614 lines of code in units (57.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (97 lines of code)
    • 5 simple units (145 lines of code)
    • 37 very simple units (372 lines of code)
0% | 0% | 15% | 23% | 60%
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
py0% | 0% | 15% | 23% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 16% | 24% | 58%
face_align0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def reinitialize_requires_grad_diff_layers()
in one_shot_domain_adaptation.py
22 20 2
def finetune_weights_from_images()
in one_shot_domain_adaptation.py
43 11 4
def forward()
in models_all.py
32 11 2
def find_latent_from_images()
in one_shot_domain_adaptation.py
43 10 3
def forward()
in models_all.py
16 9 3
def __init__()
in losses.py
21 8 3
def regenerate_img()
in one_shot_domain_adaptation.py
34 7 5
def generate_fake_images()
in one_shot_domain_adaptation.py
31 6 3
def read_image_to_numpy()
in one_shot_domain_adaptation.py
11 5 1
def get_landmarks()
in face_align/landmarks_detector_dlib.py
13 5 2
def generate_new_imgs()
in one_shot_domain_adaptation.py
21 4 4
def __init__()
in models_all.py
13 4 5
def __init__()
in models_all.py
19 4 3
def forward()
in losses.py
10 4 3
def crop_and_rotate_img()
in one_shot_domain_adaptation.py
13 3 4
def shape_to_np_dlib()
in face_align/landmarks_detector_dlib.py
5 3 2
def upscale2d()
in models_all.py
13 3 3
def forward()
in models_all.py
8 3 2
def initialize_models_all()
in one_shot_domain_adaptation.py
29 2 1
def __init__()
in face_align/landmarks_detector_dlib.py
3 2 3