pytorch / vision
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 415 files with 51,444 lines of code.
    • 2 very long files (2,736 lines of code)
    • 10 long files (6,641 lines of code)
    • 67 medium size files (18,779 lines of codeclsfd_ftr_w_mp_ins)
    • 93 small files (13,252 lines of code)
    • 243 very small files (10,036 lines of code)
5% | 12% | 36% | 25% | 19%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
py4% | 9% | 38% | 28% | 19%
cu37% | 17% | 39% | 4% | 0%
cpp0% | 27% | 31% | 24% | 15%
h0% | 0% | 20% | 14% | 65%
bash0% | 0% | 100% | 0% | 0%
cmake0% | 0% | 0% | 100% | 0%
yaml0% | 0% | 0% | 0% | 100%
mm0% | 0% | 0% | 0% | 100%
ps10% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
in0% | 0% | 0% | 0% | 100%
cfg0% | 0% | 0% | 0% | 100%
toml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
torchvision/prototype14% | 5% | 19% | 36% | 23%
torchvision/csrc7% | 21% | 31% | 19% | 19%
torchvision/transforms0% | 73% | 21% | 0% | 4%
torchvision/models0% | 6% | 60% | 24% | 8%
torchvision/datasets0% | 0% | 21% | 44% | 33%
references/classification0% | 0% | 82% | 0% | 17%
references/detection0% | 0% | 51% | 38% | 10%
torchvision/io0% | 0% | 75% | 14% | 10%
references/segmentation0% | 0% | 72% | 0% | 27%
references/optical_flow0% | 0% | 68% | 23% | 7%
ROOT0% | 0% | 81% | 0% | 18%
references/video_classification0% | 0% | 56% | 35% | 7%
packaging0% | 0% | 100% | 0% | 0%
packaging/wheel0% | 0% | 100% | 0% | 0%
torchvision0% | 0% | 62% | 0% | 37%
torchvision/ops0% | 0% | 17% | 43% | 38%
gallery0% | 0% | 0% | 58% | 41%
cmake0% | 0% | 0% | 92% | 7%
scripts/release_notes0% | 0% | 0% | 73% | 26%
references/similarity0% | 0% | 0% | 44% | 55%
ios/VisionTestApp0% | 0% | 0% | 0% | 100%
packaging/torchvision0% | 0% | 0% | 0% | 100%
packaging/windows0% | 0% | 0% | 0% | 100%
packaging/vs20190% | 0% | 0% | 0% | 100%
packaging/vs20170% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
_meta.py
in torchvision/prototype/models
1540 -
cu
deform_conv2d_kernel.cu
in torchvision/csrc/ops/cuda
1196 -
deform_conv2d_kernel.cpp
in torchvision/csrc/ops/cpu
979 12
transforms.py
in torchvision/transforms
904 116
interpolate_aa_kernels.cpp
in torchvision/csrc/ops/cpu
693 23
functional_tensor.py
in torchvision/transforms
649 48
functional.py
in torchvision/transforms
593 40
video_reader.cpp
in torchvision/csrc/io/video_reader
585 12
roi_heads.py
in torchvision/models/detection
581 28
decoder.cpp
in torchvision/csrc/io/decoder
557 22
cu
interpolate_aa_kernels.cu
in torchvision/csrc/ops/cuda
554 -
benchmark.py
in torchvision/prototype/datasets
546 37
regnet.py
in torchvision/prototype/models
489 16
train.py
in references/classification
438 6
setup.py
in root
430 6
raft.py
in torchvision/models/optical_flow
402 30
ssd.py
in torchvision/models/detection
401 17
fcos.py
in torchvision/models/detection
401 13
cu
roi_align_kernel.cu
in torchvision/csrc/ops/cuda
393 -
cu
ps_roi_align_kernel.cu
in torchvision/csrc/ops/cuda
386 -
regnet.py
in torchvision/models
364 28
ps_roi_align_kernel.cpp
in torchvision/csrc/ops/cpu
350 7
_video_opt.py
in torchvision/io
343 15
util.cpp
in torchvision/csrc/io/decoder
342 15
mnist.py
in torchvision/datasets
337 37
autoaugment.py
in torchvision/transforms
337 15
retinanet.py
in torchvision/models/detection
334 16
mnist.py
in torchvision/prototype/datasets/_builtin
334 21
decoder.cpp
in torchvision/csrc/io/decoder/gpu
330 12
resnet.py
in torchvision/prototype/models
325 10
train.py
in references/video_classification
321 6
inception.py
in torchvision/models
321 25
roi_align_kernel.cpp
in torchvision/csrc/ops/cpu
318 6
pkg_helpers.bash
in packaging
305 -
functional_pil.py
in torchvision/transforms
295 24
vision_transformer.py
in torchvision/models
288 16
inception.cpp
in torchvision/csrc/models
285 8
utils.py
in torchvision/datasets
285 22
relocate.py
in packaging/wheel
279 12
video.cpp
in torchvision/csrc/io/video
277 11
utils.py
in references/classification
276 30
resnet.py
in torchvision/models
271 20
efficientnet.py
in torchvision/models
268 18
video.py
in torchvision/io
267 9
train.py
in references/optical_flow
266 6
video_utils.py
in torchvision/datasets
260 21
efficientnet.py
in torchvision/prototype/models
250 9
train.py
in references/segmentation
248 7
resnet.py
in torchvision/models/video
248 20
cu
ps_roi_pool_kernel.cu
in torchvision/csrc/ops/cuda
247 -
Files With Most Units (Top 20)
File# lines# units
transforms.py
in torchvision/transforms
904 116
functional_tensor.py
in torchvision/transforms
649 48
functional.py
in torchvision/transforms
593 40
mnist.py
in torchvision/datasets
337 37
benchmark.py
in torchvision/prototype/datasets
546 37
utils.py
in references/segmentation
233 32
_internal.py
in torchvision/prototype/datasets/utils
234 32
utils.py
in references/classification
276 30
raft.py
in torchvision/models/optical_flow
402 30
regnet.py
in torchvision/models
364 28
roi_heads.py
in torchvision/models/detection
581 28
utils.py
in references/detection
210 27
utils.py
in references/video_classification
198 25
utils.py
in references/optical_flow
203 25
inception.py
in torchvision/models
321 25
_optical_flow.py
in torchvision/datasets
218 24
functional_pil.py
in torchvision/transforms
295 24
interpolate_aa_kernels.cpp
in torchvision/csrc/ops/cpu
693 23
decoder.cpp
in torchvision/csrc/io/decoder
557 22
utils.py
in torchvision/datasets
285 22
Files With Long Lines (Top 20)

There are 26 files with lines longer than 120 characters. In total, there are 37 long lines.

File# lines# units# long lines
cmake
iOS.cmake
in cmake
175 - 2
train.py
in references/optical_flow
266 6 2
ps_roi_pool.cpp
in torchvision/csrc/ops
55 2 2
interpolate_aa.cpp
in torchvision/csrc/ops
66 4 2
deform_conv2d.cpp
in torchvision/csrc/ops
89 1 2
ps_roi_align.cpp
in torchvision/csrc/ops
59 2 2
roi_align.cpp
in torchvision/csrc/ops
67 2 2
roi_pool.cpp
in torchvision/csrc/ops
54 2 2
faster_rcnn.py
in torchvision/models/detection
234 9 2
faster_rcnn.py
in torchvision/prototype/models/detection
193 4 2
transforms.py
in torchvision/transforms
904 116 2
pkg_helpers.bash
in packaging
305 - 1
cu
deform_conv2d_kernel.cu
in torchvision/csrc/ops/cuda
1196 - 1
_optical_flow.py
in torchvision/datasets
218 24 1
fer2013.py
in torchvision/datasets
50 4 1
deeplabv3.py
in torchvision/models/segmentation
154 11 1
inception.py
in torchvision/models/quantization
161 19 1
mobilenetv3.py
in torchvision/models/quantization
123 12 1
ssdlite.py
in torchvision/models/detection
194 11 1
keypoint_rcnn.py
in torchvision/models/detection
161 5 1