tensorflow / tfjs
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 2,016 files with 123,762 lines of code.
    • 7 very long files (15,502 lines of code)
    • 21 long files (13,913 lines of code)
    • 73 medium size files (21,433 lines of codeclsfd_ftr_w_mp_ins)
    • 142 small files (19,501 lines of code)
    • 1,773 very small files (53,413 lines of code)
12% | 11% | 17% | 15% | 43%
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
js69% | 0% | 0% | 11% | 19%
ts5% | 12% | 17% | 16% | 47%
py49% | 27% | 3% | 9% | 9%
cc0% | 12% | 19% | 17% | 50%
tsx0% | 0% | 69% | 20% | 10%
proto0% | 0% | 100% | 0% | 0%
yml0% | 0% | 51% | 0% | 48%
h0% | 0% | 24% | 9% | 65%
bzl0% | 0% | 25% | 16% | 58%
css0% | 0% | 0% | 100% | 0%
html0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
gyp0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
cfg0% | 0% | 0% | 0% | 100%
in0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
tfjs-node42% | 10% | 13% | 3% | 29%
tfjs-layers22% | 19% | 34% | 13% | 10%
tfjs-backend-wasm20% | 0% | 11% | 14% | 53%
tfjs-backend-webgl10% | 12% | 13% | 10% | 53%
tfjs-converter15% | 26% | 17% | 18% | 22%
tfjs-core0% | 12% | 13% | 16% | 57%
tfjs-backend-webgpu0% | 12% | 9% | 27% | 50%
tfjs-data0% | 25% | 22% | 26% | 26%
tfjs-react-native0% | 0% | 43% | 23% | 33%
scripts0% | 0% | 44% | 27% | 27%
tfjs-backend-cpu0% | 0% | 11% | 9% | 79%
tfjs-vis0% | 0% | 19% | 58% | 21%
tfjs-tflite0% | 0% | 25% | 0% | 74%
tools0% | 0% | 28% | 15% | 56%
tfjs0% | 0% | 0% | 42% | 57%
tfjs-inference0% | 0% | 0% | 51% | 48%
ROOT0% | 0% | 0% | 35% | 64%
tfjs-automl0% | 0% | 0% | 30% | 69%
tfjs-node-gpu0% | 0% | 0% | 0% | 100%
tfjs-backend-nodegl0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
api_pb.js
in tfjs-node/src/proto
5770 793
cpplint.py
in tfjs-backend-wasm/tools
2984 162
shader_compiler.ts
in tfjs-backend-webgl/src
1706 87
compiled_api.js
in tfjs-converter/tools
1547 32
recurrent.ts
in tfjs-layers/src/layers
1353 64
training.ts
in tfjs-layers/src/engine
1105 33
convolutional.ts
in tfjs-layers/src/layers
1037 32
engine.ts
in tfjs-core/src
937 34
backend_webgl.ts
in tfjs-backend-webgl/src
919 26
tfjs_backend.cc
in tfjs-node/binding
905 20
merge.ts
in tfjs-layers/src/layers
875 26
container.ts
in tfjs-layers/src/engine
855 17
topology.ts
in tfjs-layers/src/engine
803 33
kernel_names.ts
in tfjs-core/src
779 -
backend_webgpu.ts
in tfjs-backend-webgpu/src
716 20
shader_preprocessor.ts
in tfjs-backend-webgpu/src
583 36
tf_saved_model_conversion_v2.py
in tfjs-converter/python/tensorflowjs/converters
576 24
nodejs_kernel_backend.ts
in tfjs-node/src
574 16
lazy_iterator.ts
in tfjs-data/src/iterators
569 66
converter.py
in tfjs-converter/python/tensorflowjs/converters
562 15
util_base.ts
in tfjs-core/src
550 50
webgl_util.ts
in tfjs-backend-webgl/src
550 49
slice_util.ts
in tfjs-core/src/ops
547 19
operation_mapper.ts
in tfjs-converter/src/operations
532 22
graph_executor.ts
in tfjs-converter/src/executor
532 31
gpgpu_context.ts
in tfjs-backend-webgl/src
521 50
wizard.py
in tfjs-converter/python/tensorflowjs/converters
516 22
pooling.ts
in tfjs-layers/src/layers
512 24
conv_util.ts
in tfjs-core/src/ops
488 17
core.ts
in tfjs-layers/src/layers
466 21
initializers.ts
in tfjs-layers/src
466 20
models.ts
in tfjs-layers/src
461 16
wrappers.ts
in tfjs-layers/src/layers
447 17
base_callbacks.ts
in tfjs-layers/src
442 34
proto
api.proto
in tfjs-node/src/proto
442 -
tfjs_backend.ts
in tfjs-layers/src/backend
422 31
normalization.ts
in tfjs-layers/src/layers
405 16
convolutional_recurrent.ts
in tfjs-layers/src/layers
392 8
io_utils.ts
in tfjs-core/src/io
382 15
training_dataset.ts
in tfjs-layers/src/engine
377 8
webcam_demo.tsx
in tfjs-react-native/integration_rn59/components/webcam
373 13
tensor.ts
in tfjs-core/src
365 14
pool_gpu.ts
in tfjs-backend-webgl/src
357 7
gpgpu_math.ts
in tfjs-backend-webgl/src
354 8
training_tensors.ts
in tfjs-layers/src/engine
347 8
backend_wasm.ts
in tfjs-backend-wasm/src
344 15
generic_utils.ts
in tfjs-layers/src/utils
335 24
control_executor.ts
in tfjs-converter/src/operations/executors
334 -
register_all_kernels.ts
in tfjs-backend-cpu/src
332 -
register_all_kernels.ts
in tfjs-backend-webgl/src
330 -
Files With Most Units (Top 20)
File# lines# units
api_pb.js
in tfjs-node/src/proto
5770 793
cpplint.py
in tfjs-backend-wasm/tools
2984 162
shader_compiler.ts
in tfjs-backend-webgl/src
1706 87
exports_layers.ts
in tfjs-layers/src
222 67
lazy_iterator.ts
in tfjs-data/src/iterators
569 66
recurrent.ts
in tfjs-layers/src/layers
1353 64
util_base.ts
in tfjs-core/src
550 50
gpgpu_context.ts
in tfjs-backend-webgl/src
521 50
webgl_util.ts
in tfjs-backend-webgl/src
550 49
shader_preprocessor.ts
in tfjs-backend-webgpu/src
583 36
engine.ts
in tfjs-core/src
937 34
base_callbacks.ts
in tfjs-layers/src
442 34
topology.ts
in tfjs-layers/src/engine
803 33
training.ts
in tfjs-layers/src/engine
1105 33
convolutional.ts
in tfjs-layers/src/layers
1037 32
compiled_api.js
in tfjs-converter/tools
1547 32
tfjs_backend.ts
in tfjs-layers/src/backend
422 31
graph_executor.ts
in tfjs-converter/src/executor
532 31
merge.ts
in tfjs-layers/src/layers
875 26
backend_webgl.ts
in tfjs-backend-webgl/src
919 26
Files With Long Lines (Top 20)

There are 315 files with lines longer than 120 characters. In total, there are 354 long lines.

File# lines# units# long lines
api_pb.js
in tfjs-node/src/proto
5770 793 17
exports_layers.ts
in tfjs-layers/src
222 67 8
base.ts
in tfjs-core/src
57 - 4
training.ts
in tfjs-layers/src/engine
1105 33 3
cloudbuild_general_config.yml
in scripts
61 - 2
cloudbuild.yml
in tfjs
50 - 2
tflite_model.ts
in tfjs-tflite/src
224 9 2
http.ts
in tfjs-core/src/io
195 9 2
io.ts
in tfjs-core/src/io
45 - 2
layer_serialization.ts
in tfjs-layers/src/keras_format/layers
26 - 2
initializers.ts
in tfjs-layers/src
466 20 2
index.ts
in tfjs-automl/src
4 - 2
texture_manager.ts
in tfjs-backend-webgl/src
171 5 2
backend_wasm.ts
in tfjs-backend-wasm/src
344 15 2
conv2d_mm_webgpu.ts
in tfjs-backend-webgpu/src
151 4 2
update-tfjs-lockfiles.ts
in scripts
73 - 1
release-tfjs.ts
in scripts
100 2 1
cloudbuild_e2e_expected.yml
in scripts
271 - 1
index.js
in scripts/cloud_funcs/sync_reactnative
49 2 1
release-website.ts
in scripts
54 1 1