A WebGL accelerated JavaScript library for training and deploying ML models.
973 matches across 18 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-automl/scripts/build-npm.sh | 1 | #!/usr/bin/env bash |
| LOW | tfjs-automl/scripts/test-ci.sh | 1 | #!/usr/bin/env bash |
| LOW | tools/enumerate-tests.ts | 1 | #!/usr/bin/env node |
| LOW | tools/make_version_test_file.ts | 1 | #!/usr/bin/env node |
| LOW | tfjs-core/scripts/test-bundle-size.js | 1 | #!/usr/bin/env node |
| LOW | tfjs-core/scripts/build-npm.sh | 1 | #!/usr/bin/env bash |
| LOW | tfjs-core/src/util_base.ts | 741 | // 1. It only reliably works for es6 Promise, not other Promise |
| LOW | tfjs-core/src/hash_util_test.ts | 41 | const MAX_INT32 = ACMRandom.MAX_INT32; |
| LOW | tfjs-core/src/optimizers/rmsprop_optimizer_test.ts | 41 | // epsilon = 1e-8 |
| LOW | tfjs-core/src/optimizers/rmsprop_optimizer_test.ts | 101 | expect(tf.memory().numTensors).toBe(numTensors + 4); |
| LOW | tfjs-core/src/optimizers/rmsprop_optimizer_test.ts | 121 | // x = [0.54117, 1.541169] |
| LOW | tfjs-core/src/optimizers/adam_optimizer_test.ts | 41 | // beta1 * old_first_m_w1 + (1-beta1) * grad_w1, |
| LOW | tfjs-core/src/optimizers/adam_optimizer_test.ts | 61 | // beta1 * old_first_m_w2 + (1-beta1) * grad_w2 |
| LOW | tfjs-core/src/optimizers/adamax_optimizer_test.ts | 41 | expect(tf.memory().numTensors).toBe(numTensors + 3); |
| LOW | tfjs-core/src/optimizers/adamax_optimizer_test.ts | 61 | // w2_old - updates_2 |
| LOW | tfjs-core/src/optimizers/adamax_optimizer_test.ts | 81 | // 0.9 * 4, |
| LOW | tfjs-core/src/optimizers/adagrad_optimizer_test.ts | 41 | // newAccumulatedGrad = accumulatedGrad + grad^2 |
| LOW | tfjs-core/src/optimizers/adadelta_optimizer_test.ts | 41 | // newAccumulatedGrad = rho * accumulatedGrad + (1 - rho) * grad ^ 2 |
| LOW | tfjs-core/src/ops/confusion_matrix_test.ts | 21 | |
| LOW | tfjs-core/src/ops/confusion_matrix_test.ts | 61 | // |
| LOW | tfjs-core/src/ops/reverse_4d_test.ts | 21 | |
| LOW | tfjs-core/src/ops/reverse_4d_test.ts | 41 | // ], |
| LOW | tfjs-core/src/ops/conv2d_transpose_test.ts | 261 | // x = tf.constant(np.array([[ |
| LOW | tfjs-core/src/ops/conv2d_transpose_test.ts | 321 | expectArraysClose(await filtGrad.data(), await expectedFiltGrad.data()); |
| LOW | tfjs-core/src/ops/conv2d_transpose_test.ts | 381 | const expectedFiltGrad = tf.ones([2, 2, 2, 1]).mul(tf.scalar(-0.01444618)); |
| LOW | tfjs-core/src/ops/conv2d_transpose_test.ts | 401 | // [[[0.34968338], [-0.42306114]], [[1.27395733], [-1.09014535]]] |
| LOW | tfjs-core/src/ops/conv2d_transpose_test.ts | 501 | // ```py |
| LOW | tfjs-core/src/ops/reverse_3d_test.ts | 21 | |
| LOW | tfjs-core/src/ops/moving_average_test.ts | 21 | |
| LOW | tfjs-core/src/ops/moving_average_test.ts | 81 | // |
| LOW | tfjs-core/src/ops/log_softmax.ts | 61 | if (axis !== $logits.rank - 1) { |
| LOW | tfjs-core/src/ops/pad_test.ts | 201 | // 0, 0, 0 |
| LOW | tfjs-backend-cpu/scripts/build-npm.sh | 1 | #!/usr/bin/env bash |
| LOW | …s-backend-cpu/src/kernels/RaggedTensorToTensor_impl.ts | 201 | // -1 indicates an element or list that is out of range. |
| LOW | tfjs-backend-cpu/src/kernels/Unique_impl.ts | 21 | values: BackendValues, axis: number, shape: number[], dtype: DataType): { |
| LOW | tfjs-backend-cpu/src/kernels/Unique_impl.ts | 41 | // intermediate TensorBuffer (see inputBuffer below) to allow us to extract |
| LOW | tfjs-backend-cpu/src/kernels/Unique_impl.ts | 61 | // ], |
| LOW | tfjs-layers/tools/clang_format_ts.sh | 1 | #!/bin/bash |
| LOW | tfjs-layers/src/losses_test.ts | 181 | expectTensorsClose(result, expected); |
| LOW | tfjs-layers/src/losses_test.ts | 221 | // with tf.Session() as sess: |
| LOW | tfjs-layers/src/losses_test.ts | 261 | // |
| LOW | tfjs-layers/src/metrics_test.ts | 81 | // Use the following Python code to generate the reference values: |
| LOW | tfjs-layers/src/metrics_test.ts | 101 | const accuracy = tfl.metrics.binaryCrossentropy(x, y); |
| LOW | tfjs-layers/src/metrics_test.ts | 181 | }); |
| LOW | tfjs-layers/src/metrics_test.ts | 201 | // ]) |
| LOW | tfjs-layers/src/metrics_test.ts | 241 | // |
| LOW | tfjs-layers/src/layers/advanced_activation_test.ts | 81 | describeMathCPUAndWebGL2('PReLU: Tensor', () => { |
| LOW | tfjs-layers/src/layers/advanced_activation_test.ts | 121 | expect(history.history.loss[2]).toBeCloseTo(0.049144); |
| LOW | tfjs-layers/src/layers/convolutional_test.ts | 481 | // # the 3D convolutions. |
| LOW | tfjs-layers/src/layers/convolutional_test.ts | 501 | // # 178., 186., 190., 194., 202., 206., 210.], dtype=float32) |
| LOW | tfjs-layers/src/layers/convolutional_test.ts | 741 | // tslint:disable-next-line:no-any |
| LOW | tfjs-layers/src/layers/convolutional_test.ts | 841 | // ```python |
| LOW | tfjs-layers/src/layers/core_test.ts | 821 | // model.add(tf.keras.layers.SimpleRNN( |
| LOW | tfjs-layers/src/layers/core_test.ts | 841 | }); |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 81 | }); |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 121 | ]])); |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 141 | // z1 = keras.layers.Embedding(10, |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 361 | // The golden tensor values used in the tests below can be obtained with |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 461 | // rnn = keras.layers.LSTM( |
| LOW | tfjs-layers/src/layers/wrappers_test.ts | 501 | }); |
| 278 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tfjs-automl/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-automl/scripts/test-ci.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-core/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-backend-cpu/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-layers/tools/clang_format_ts.sh | 8 | # ============================================================================== |
| MEDIUM | tfjs-backend-webgpu/scripts/publish-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-backend-webgpu/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-inference/python/inference.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-inference/scripts/run_python.sh | 8 | # ============================================================================= |
| MEDIUM | scripts/buildifier-ci.sh | 15 | # ============================================================================= |
| MEDIUM | scripts/publish-npm.sh | 15 | # ============================================================================= |
| MEDIUM | scripts/run_bazel_ci_tests.sh | 15 | # ============================================================================= |
| MEDIUM | scripts/run-build.sh | 15 | # ============================================================================= |
| MEDIUM | .github/workflows/stale.yaml | 14 | # ============================================================================== |
| MEDIUM | tfjs-backend-wasm/scripts/build-ci.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-backend-wasm/scripts/build-wasm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-backend-wasm/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-backend-wasm/scripts/test-ci.sh | 8 | # ============================================================================= |
| MEDIUM | tfjs/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs/scripts/test-ci.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-react-native/integration_rn59/scripts/test-ci.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-react-native/scripts/update-apk.sh | 15 | # ============================================================================= |
| MEDIUM | e2e/integration_tests/convert_predict.py | 14 | # ============================================================================= |
| MEDIUM | e2e/integration_tests/metadata.py | 14 | # ============================================================================= |
| MEDIUM | e2e/integration_tests/create_save_predict.py | 6 | # ============================================================================= |
| MEDIUM | e2e/custom_module/dense_model/build.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/custom_module/universal_sentence_encoder/build.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/custom_module/blazeface/build.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/scripts/local-registry.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/create-python-models.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/release-e2e.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/run-custom-builds.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/scripts/deploy-benchmarks.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/test-ci.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/build-deps-ci.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/cleanup-py-env.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/scripts/test.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/create_save_predict.sh | 16 | # ============================================================================== |
| MEDIUM | e2e/scripts/fetch-graph-model-golden-data-ci.sh | 15 | # ============================================================================== |
| MEDIUM | e2e/scripts/setup-py-env.sh | 16 | # ============================================================================== |
| MEDIUM | tfjs-node/python/int64_model.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-node/python/unint8_model.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-node/scripts/publish-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-node/scripts/publish-npm-gpu.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-node/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-node/scripts/build-and-upload-addon.sh | 14 | # ============================================================================= |
| MEDIUM | tfjs-data/scripts/build-npm.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-data/scripts/test-ci.sh | 8 | # ============================================================================= |
| MEDIUM | tfjs-converter/python/update_locked_deps.sh | 15 | # ============================================================================= |
| MEDIUM | tfjs-converter/python/build-pip-package.sh | 15 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/run-python-tests.sh | 15 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/setup.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/test_nightly_pip_package.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/test_pip_package.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/tensorflowjs/quantization_test.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/tensorflowjs/write_weights.py | 14 | # ============================================================================== |
| MEDIUM | …-converter/python/tensorflowjs/resource_loader_test.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/tensorflowjs/quantization.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/tensorflowjs/read_weights.py | 14 | # ============================================================================== |
| MEDIUM | tfjs-converter/python/tensorflowjs/__init__.py | 14 | # ============================================================================== |
| 37 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | rollup.config.helpers.js | 31 | export function getBrowserBundleConfigOptions( |
| LOW | tfjs-automl/src/object_detection.ts | 126 | function calculateMostLikelyLabels( |
| LOW | tfjs-core/scripts/test_snippets/util.ts | 179 | function convertDocStringToDocInfoObject(docString: string): JSDoc { |
| LOW | tfjs-core/src/util_base.ts | 620 | export function convertBackendValuesAndArrayBuffer( |
| LOW | tfjs-core/src/util_base.ts | 678 | export function assertNonNegativeIntegerDimensions(shape: number[]) { |
| LOW | tfjs-core/src/jasmine_util.ts | 167 | export function parseTestEnvFromKarmaFlags( |
| LOW | tfjs-core/src/engine.ts | 1289 | export function getOrMakeEngine(): Engine { |
| LOW | tfjs-core/src/globals.ts | 56 | export function disableDeprecationWarnings(): void { |
| LOW | tfjs-core/src/tensor_util_env.ts | 57 | function deepAssertShapeConsistency( |
| LOW | tfjs-core/src/io/io_utils.ts | 495 | export function getModelJSONForModelArtifacts( |
| LOW | tfjs-core/src/io/io_utils.ts | 533 | export function getModelArtifactsForJSONSync( |
| LOW | tfjs-core/src/io/io_utils.ts | 602 | export function getModelArtifactsInfoForJSON(modelArtifacts: ModelArtifacts): |
| LOW | tfjs-core/src/io/local_storage.ts | 40 | export function purgeLocalStorageArtifacts(): string[] { |
| LOW | tfjs-core/src/ops/segment_util.ts | 30 | export function segOpComputeOptimalWindowSize( |
| LOW | tfjs-core/src/ops/broadcast_util.ts | 60 | export function assertAndGetBroadcastShape( |
| LOW | tfjs-core/src/ops/pool.ts | 133 | function requiredSpaceToBatchPaddings( |
| LOW | tfjs-core/src/ops/pool.ts | 149 | function withSpaceToBatchBasePaddings( |
| LOW | tfjs-core/src/ops/ragged_to_dense_util.ts | 27 | export function combineRaggedTensorToTensorShapes( |
| LOW | tfjs-core/src/ops/ragged_to_dense_util.ts | 78 | export function getRowPartitionTypesHelper(rowPartitionTypeStrings: string[]) { |
| LOW | tfjs-core/src/ops/ragged_to_dense_util.ts | 110 | export function validateDefaultValueShape( |
| LOW | tfjs-core/src/ops/conv3d_test.ts | 39 | function generateGradientCaseInputs( |
| LOW | tfjs-core/src/ops/browser.ts | 183 | function isImageBitmapFullySupported() { |
| LOW | tfjs-core/src/ops/browser.ts | 194 | function canWrapPixelsToImageBitmap(pixels: PixelData|ImageData| |
| LOW | tfjs-core/src/ops/rand_util.ts | 233 | export function expectArrayInMeanStdRange( |
| LOW | tfjs-core/src/ops/conv_util.ts | 571 | export function eitherStridesOrDilationsAreOne( |
| LOW | tfjs-core/src/ops/conv_util.ts | 576 | export function stridesOrDilationsArePositive(values: number| |
| LOW | tfjs-core/src/ops/conv_util.ts | 614 | export function checkPadOnDimRoundingMode( |
| LOW | tfjs-core/src/ops/axis_util.ts | 49 | export function computeOutAndReduceShapes( |
| LOW | tfjs-core/src/ops/axis_util.ts | 68 | export function assertAxesAreInnerMostDims( |
| LOW | tfjs-core/src/ops/slice_util.ts | 209 | export function startIndicesWithElidedDims( |
| LOW | tfjs-core/src/ops/slice_util.ts | 234 | export function stopIndicesWithElidedDims( |
| LOW | tfjs-core/src/ops/sparse/sparse_reshape_util.ts | 25 | export function getSparseReshapeMultipleNegativeOneOutputDimErrorMessage( |
| LOW | tfjs-core/src/ops/sparse/sparse_reshape_util.ts | 36 | export function getSparseReshapeNegativeOutputDimErrorMessage( |
| LOW | tfjs-core/src/ops/sparse/sparse_reshape_util.ts | 45 | export function getSparseReshapeEmptyTensorZeroOutputDimErrorMessage() { |
| LOW | tfjs-core/src/ops/sparse/sparse_reshape_util.ts | 56 | export function getSparseReshapeInputOutputMultipleErrorMessage( |
| LOW | tfjs-core/src/ops/sparse/sparse_reshape_util.ts | 71 | export function getSparseReshapeInputOutputMismatchErrorMessage( |
| LOW | tfjs-core/src/ops/sparse/sparse_fill_empty_rows_util.ts | 23 | export function getSparseFillEmptyRowsIndicesDenseShapeMismatch( |
| LOW | tfjs-core/src/ops/sparse/sparse_fill_empty_rows_util.ts | 35 | export function getSparseFillEmptyRowsNegativeIndexErrorMessage( |
| LOW | tfjs-core/src/ops/sparse/sparse_fill_empty_rows_util.ts | 47 | export function getSparseFillEmptyRowsOutOfRangeIndexErrorMessage( |
| LOW | …s-core/src/ops/sparse/sparse_segment_reduction_util.ts | 22 | export function getSparseSegmentReductionNegativeSegmentIdsErrorMessage() { |
| LOW | …s-core/src/ops/sparse/sparse_segment_reduction_util.ts | 30 | export function getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage() { |
| LOW | …s-core/src/ops/sparse/sparse_segment_reduction_util.ts | 40 | export function getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage( |
| LOW | …s-core/src/ops/sparse/sparse_segment_reduction_util.ts | 53 | export function getSparseSegmentReductionIndicesOutOfRangeErrorMessage( |
| LOW | …s-backend-cpu/src/kernels/ResizeNearestNeighborGrad.ts | 23 | export function resizeNearestNeighborGrad(args: { |
| LOW | …backend-cpu/src/kernels/StringToHashBucketFast_impl.ts | 20 | export function stringToHashBucketFastImpl( |
| LOW | …backend-cpu/src/kernels/SparseSegmentReduction_impl.ts | 20 | export function sparseSegmentReductionImpl( |
| LOW | tfjs-backend-cpu/src/utils/binary_impl.ts | 25 | export function createSimpleBinaryKernelImpl(op: SimpleBinaryOperation): |
| LOW | tfjs-backend-cpu/src/utils/binary_utils.ts | 135 | export function createComplexBinaryKernelImpl(op: ComplexBinaryOperation): |
| LOW | tfjs-layers/src/user_defined_metadata_test.ts | 94 | function createSequentialModelForTest(): Sequential { |
| LOW | tfjs-layers/src/user_defined_metadata_test.ts | 104 | function createFunctionalModelForTest(): tfl.LayersModel { |
| LOW | tfjs-layers/src/losses.ts | 45 | export function meanAbsolutePercentageError( |
| LOW | tfjs-layers/src/losses.ts | 56 | export function meanSquaredLogarithmicError( |
| LOW | tfjs-layers/src/losses.ts | 136 | export function sparseCategoricalCrossentropy( |
| LOW | tfjs-layers/src/losses.ts | 171 | export function sigmoidCrossEntropyWithLogits( |
| LOW | tfjs-layers/src/losses.ts | 202 | export function kullbackLeiblerDivergence( |
| LOW | tfjs-layers/src/exports_metrics.ts | 88 | export function sparseCategoricalAccuracy( |
| LOW | tfjs-layers/src/exports_metrics.ts | 275 | export function meanAbsolutePercentageError( |
| LOW | tfjs-layers/src/models.ts | 282 | export async function loadLayersModelFromIOHandler( |
| LOW | tfjs-layers/src/models.ts | 344 | function decodeModelAndOptimizerWeights( |
| LOW | tfjs-layers/src/metrics.ts | 92 | export function sparseCategoricalAccuracy( |
| 219 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | e2e/integration_tests/convert_predict.py | 147 | builder = tf.compat.v1.saved_model.builder.SavedModelBuilder(save_dir) |
| CRITICAL | e2e/integration_tests/convert_predict.py | 386 | builder = tf.compat.v1.saved_model.builder.SavedModelBuilder(save_dir) |
| CRITICAL | tfjs-data/src/dataset_test.ts | 368 | expect(compare.complexThenBatch.a.q.ab.x.dataSync()) |
| CRITICAL | tfjs-data/src/dataset_test.ts | 369 | .toEqual(compare.batchThenComplex.a.q.ab.x.dataSync()); |
| CRITICAL | tfjs-data/src/dataset_test.ts | 373 | expect(compare.complexThenBatch.b.bb.bbb.dataSync()) |
| CRITICAL | tfjs-data/src/dataset_test.ts | 374 | .toEqual(compare.batchThenComplex.b.bb.bbb.dataSync()); |
| CRITICAL | tfjs-data/src/dataset_test.ts | 378 | expect(compare.complexThenBatch.c.ca.x.dataSync()) |
| CRITICAL | tfjs-data/src/dataset_test.ts | 379 | .toEqual(compare.batchThenComplex.c.ca.x.dataSync()); |
| CRITICAL | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 70 | builder = tf.compat.v1.saved_model.builder.SavedModelBuilder(save_dir) |
| CRITICAL | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 108 | builder = tf.compat.v1.saved_model.builder.SavedModelBuilder( |
| CRITICAL | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 385 | builder = tf.compat.v1.saved_model.builder.SavedModelBuilder( |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-inference/python/inference_test.py | 18 | |
| LOW | tfjs-inference/python/inference_test.py | 19 | |
| LOW | tfjs-inference/python/inference_test.py | 20 | |
| LOW | tfjs-inference/python/inference.py | 17 | |
| LOW | tfjs-inference/python/inference.py | 18 | |
| LOW | tfjs-inference/python/inference.py | 19 | |
| LOW | e2e/integration_tests/convert_predict.py | 24 | |
| LOW | e2e/integration_tests/convert_predict.py | 25 | |
| LOW | e2e/integration_tests/convert_predict.py | 26 | |
| LOW | e2e/integration_tests/convert_predict.py | 28 | |
| LOW | e2e/integration_tests/convert_predict.py | 29 | |
| LOW | e2e/integration_tests/convert_predict.py | 34 | |
| LOW | e2e/integration_tests/convert_predict.py | 36 | |
| LOW | e2e/integration_tests/convert_predict.py | 48 | |
| LOW | e2e/integration_tests/metadata.py | 24 | |
| LOW | e2e/integration_tests/metadata.py | 25 | |
| LOW | e2e/integration_tests/metadata.py | 26 | |
| LOW | e2e/integration_tests/metadata.py | 28 | |
| LOW | e2e/integration_tests/metadata.py | 29 | |
| LOW | e2e/integration_tests/metadata.py | 34 | |
| LOW | e2e/integration_tests/metadata.py | 36 | |
| LOW | e2e/integration_tests/metadata.py | 38 | |
| LOW | e2e/integration_tests/metadata.py | 39 | |
| LOW | e2e/integration_tests/metadata.py | 42 | |
| LOW | e2e/integration_tests/metadata.py | 43 | |
| LOW | e2e/integration_tests/metadata.py | 47 | |
| LOW | e2e/integration_tests/metadata.py | 48 | |
| LOW | e2e/integration_tests/create_save_predict.py | 15 | |
| LOW | e2e/integration_tests/create_save_predict.py | 16 | |
| LOW | e2e/integration_tests/create_save_predict.py | 17 | |
| LOW | e2e/integration_tests/create_save_predict.py | 21 | |
| LOW | e2e/integration_tests/create_save_predict.py | 22 | |
| LOW | e2e/integration_tests/create_save_predict.py | 28 | |
| LOW | tfjs-node/python/int64_model.py | 22 | |
| LOW | tfjs-converter/python/test_nightly_pip_package.py | 17 | |
| LOW | tfjs-converter/python/test_nightly_pip_package.py | 18 | |
| LOW | tfjs-converter/python/test_nightly_pip_package.py | 19 | |
| LOW | tfjs-converter/python/test_pip_package.py | 17 | |
| LOW | tfjs-converter/python/test_pip_package.py | 18 | |
| LOW | tfjs-converter/python/test_pip_package.py | 19 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization_test.py | 15 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization_test.py | 16 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization_test.py | 17 | |
| LOW | …-converter/python/tensorflowjs/resource_loader_test.py | 16 | |
| LOW | …-converter/python/tensorflowjs/resource_loader_test.py | 17 | |
| LOW | …-converter/python/tensorflowjs/resource_loader_test.py | 18 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization.py | 15 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization.py | 16 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization.py | 17 | |
| LOW | tfjs-converter/python/tensorflowjs/read_weights.py | 17 | |
| LOW | tfjs-converter/python/tensorflowjs/read_weights.py | 18 | |
| LOW | tfjs-converter/python/tensorflowjs/read_weights.py | 19 | |
| LOW | tfjs-converter/python/tensorflowjs/__init__.py | 16 | |
| LOW | tfjs-converter/python/tensorflowjs/__init__.py | 17 | |
| LOW | tfjs-converter/python/tensorflowjs/__init__.py | 18 | |
| LOW | tfjs-converter/python/tensorflowjs/__init__.py | 21 | |
| LOW | tfjs-converter/python/tensorflowjs/__init__.py | 22 | |
| LOW | tfjs-converter/python/tensorflowjs/resource_loader.py | 17 | |
| LOW | tfjs-converter/python/tensorflowjs/resource_loader.py | 18 | |
| LOW | tfjs-converter/python/tensorflowjs/resource_loader.py | 19 | |
| 64 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tfjs-converter/python/tensorflowjs/quantization.py | 34 | Maps node names to their quantization dtypes. Given a quantization_dtype_map which maps dtypes `uint8`, `uint16`, `fl |
| HIGH | tfjs-converter/python/tensorflowjs/quantization.py | 94 | Quantizes the weights by linearly re-scaling across available bits. The weights are quantized by linearly re-scaling |
| HIGH | tfjs-converter/python/tensorflowjs/quantization.py | 176 | Computes quantization range to ensure that zero is represented if covered. Gymnastics with nudged zero point is to en |
| HIGH | tfjs-converter/python/tensorflowjs/read_weights.py | 127 | Load weight values from buffer(s) according to a weights manifest. Args: weights_manifest: A TensorFlow.js-format |
| HIGH | tfjs-converter/python/tensorflowjs/resource_loader.py | 25 | Opens the file at given path, where path is relative to tensorflowjs/. Args: path: a string resource path relativ |
| HIGH | tfjs-converter/python/tensorflowjs/resource_loader.py | 41 | List the files inside a dir where path is relative to tensorflowjs/. Args: path: a string path to a resource dire |
| HIGH | …r/python/tensorflowjs/converters/normalize_bias_add.py | 24 | Convert AddV2 ops and Add ops to BiasAdd if they could be fused with the ancestor node. Grappler and the TFJS's fus |
| HIGH | …r/python/tensorflowjs/converters/graph_rewrite_util.py | 28 | Pulls a node def from a dictionary for a given name. Args: node_map: Dictionary containing an entry indexed by na |
| HIGH | …r/python/tensorflowjs/converters/graph_rewrite_util.py | 47 | Extracts the values from a const NodeDef as a numpy ndarray. Args: node_def: Const NodeDef that has the values we |
| HIGH | …converter/python/tensorflowjs/converters/fuse_prelu.py | 30 | Modifies the provided graph by fusing a set of ops into a single Prelu op. The formula of PReLU is: f(x) = alpha * x |
| HIGH | …converter/python/tensorflowjs/converters/fuse_prelu.py | 142 | Tensorflow does not support Prelu op, and the grappler remap optimizer will not fuse the prelu op with _FusedConv2D op |
| HIGH | …er/python/tensorflowjs/converters/keras_tfjs_loader.py | 242 | Load a Keras Model from TensorFlow.js-format artifacts from file system Args: config_json_path: Path to the Tenso |
| HIGH | …er/python/tensorflowjs/converters/keras_tfjs_loader.py | 309 | Load a Keras Model from TensorFlow.js-format artifacts from file system Args: config_json_path: Path to the Tenso |
| HIGH | …/python/tensorflowjs/converters/keras_h5_conversion.py | 202 | Load topology & weight values from HDF5 file and convert. The HDF5 file is one generated by Keras' save_model method |
| HIGH | …/python/tensorflowjs/converters/keras_h5_conversion.py | 254 | Load topology & weight values from HDF5 file and convert. The HDF5 weights file is one generated by Keras's save_mode |
| HIGH | …/python/tensorflowjs/converters/keras_h5_conversion.py | 321 | Load weight values from a Keras HDF5 file and to a binary format. The HDF5 file is one generated by Keras' Model.save |
| HIGH | …ython/tensorflowjs/converters/fuse_depthwise_conv2d.py | 98 | Modifies the provided graph by fusing a set of ops into a single _FusedDepthwiseConv2d op. DepthwiseConv2dNative + |
| HIGH | …ython/tensorflowjs/converters/fuse_depthwise_conv2d.py | 126 | Modifies the provided graph by fusing a set of ops into a single _FusedDepthwiseConv2d op. DepthwiseConv2dNative + |
| HIGH | …ter/python/tensorflowjs/converters/fold_batch_norms.py | 51 | Removes batch normalization ops by folding them into convolutions. Batch normalization during training has multiple d |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tfjs-backend-wasm/tools/cpplint.py | 5537 | # The following function is just a speed up, no semantics are changed. |
| MEDIUM | e2e/integration_tests/convert_predict.py | 16 | # This file is 1/2 of the test suites for CUJ: convert->predict. |
| MEDIUM | e2e/integration_tests/convert_predict.py | 146 | # Create a builder. |
| MEDIUM | e2e/integration_tests/convert_predict.py | 385 | # Create a builder. |
| MEDIUM | e2e/integration_tests/convert_predict.py | 495 | # Create the directory to store model and data. |
| MEDIUM | e2e/integration_tests/metadata.py | 16 | # This file is 1/2 of the test suites for CUJ: convert->predict. |
| MEDIUM | e2e/integration_tests/metadata.py | 97 | # Create the directory to store model and data. |
| MEDIUM | e2e/integration_tests/create_save_predict.py | 8 | # This file is 2/3 of the test suites for CUJ: create->save->predict. |
| MEDIUM | tfjs-converter/python/build-pip-package.sh | 247 | # Create a virtualenv and install twine in it for uploading. |
| MEDIUM | tfjs-converter/python/test_pip_package.py | 91 | # Create a builder. |
| MEDIUM | tfjs-converter/python/test_pip_package.py | 136 | # Create a builder |
| MEDIUM | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 68 | # Create a builder. |
| MEDIUM | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 106 | # Create a builder. |
| MEDIUM | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 384 | # Create a builder |
| MEDIUM | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 893 | # Define the strip graph functions when TransformGraph is available, this will |
| MEDIUM | …erter/python/tensorflowjs/converters/converter_test.py | 700 | # Create a fie at the path to elicit the error. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-backend-wasm/tools/cpplint.py | 583 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 1188 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 1288 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 1519 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 1641 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 2780 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3046 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3117 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3171 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3299 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3658 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3736 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4002 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4129 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4279 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4526 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4600 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 5013 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 5152 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 5498 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 5946 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 6145 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 808 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 1452 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 2525 | |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 2582 | |
| LOW | tfjs-converter/python/setup.py | 28 | |
| LOW | tfjs-converter/python/tensorflowjs/quantization.py | 33 | |
| LOW | tfjs-converter/python/tensorflowjs/read_weights.py | 126 | |
| LOW | …r/python/tensorflowjs/converters/graph_rewrite_util.py | 81 | |
| LOW | …r/python/tensorflowjs/converters/graph_rewrite_util.py | 108 | |
| LOW | …-converter/python/tensorflowjs/converters/converter.py | 534 | |
| LOW | …-converter/python/tensorflowjs/converters/converter.py | 588 | |
| LOW | …-converter/python/tensorflowjs/converters/converter.py | 609 | |
| LOW | tfjs-converter/python/tensorflowjs/converters/wizard.py | 91 | |
| LOW | tfjs-converter/python/tensorflowjs/converters/wizard.py | 214 | |
| LOW | tfjs-converter/python/tensorflowjs/converters/wizard.py | 294 | |
| LOW | …/python/tensorflowjs/converters/keras_h5_conversion.py | 183 | |
| LOW | …/python/tensorflowjs/converters/keras_h5_conversion.py | 294 | |
| LOW | …thon/tensorflowjs/converters/keras_tfjs_loader_test.py | 308 | |
| LOW | …ter/python/tensorflowjs/converters/fold_batch_norms.py | 50 | |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 370 | |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 412 | |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 492 | |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 882 | |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 896 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tfjs-node/python/int64_model.py | 0 | test a basic model with functions to make sure functions are inlined. |
| HIGH | tfjs-node/python/unint8_model.py | 0 | test a basic model with functions to make sure functions are inlined. |
| HIGH | …onverter/python/tensorflowjs/converters/wizard_test.py | 0 | test a basic model with functions to make sure functions are inlined. |
| HIGH | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 0 | test a basic model with functions to make sure functions are inlined. |
| HIGH | …rter/python/tensorflowjs/converters/fuse_prelu_test.py | 0 | test a basic model with functions to make sure functions are inlined. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-core/src/ops/slice_util.ts | 442 | // Step 1: Account for ellipsis and new axis. |
| LOW | tfjs-core/src/ops/slice_util.ts | 473 | // Step 2: Make a sparse spec into a full index spec. |
| LOW | tfjs-core/src/ops/slice_util.ts | 492 | // Step 3: Make implicit ranges (non-zero beginMasks and endMasks) explicit |
| LOW | tfjs-core/src/ops/slice_util.ts | 601 | // Step 4: Compute the final shape |
| LOW | tfjs-backend-webgpu/src/kernels/TopK.ts | 118 | // Step 1: local sort |
| LOW | tfjs-backend-webgpu/src/kernels/TopK.ts | 126 | // Step 2: merge |
| LOW | tfjs-backend-webgpu/src/kernels/TopK.ts | 141 | // Step 3: rebuild |
| LOW | tfjs-backend-webgl/src/kernels/TopK.ts | 135 | // Step 1: local sort |
| LOW | tfjs-backend-webgl/src/kernels/TopK.ts | 143 | // Step 2: merge |
| LOW | tfjs-backend-webgl/src/kernels/TopK.ts | 154 | // Step 3: rebuild |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | .github/workflows/tfjs-release-branch-publish-test.yml | 41 | RELEASE: 'true' # Set RELEASE to true as requested |
| LOW | …ub/workflows/tfjs-nightly-release-and-publish-test.yml | 39 | RELEASE: 'true' # Set RELEASE to true as in the original config |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 2506 | # Check if token is an unmatched '<'. |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 3129 | # Check if the // may be in quotes. If so, ignore it |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4085 | # Check if the body is empty |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4376 | # Check if the line is a header guard. |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4735 | # Check if people are using the verboten C basic types. The only exception |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4747 | # Check if some verboten operator overloading is going on |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 4923 | # Check if some verboten C functions are being used. |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 5678 | # Set end_col to check whole lines after we are done with the |
| LOW | e2e/scripts/local-registry.sh | 33 | # Set registry to local registry |
| LOW | …flowjs/converters/tf_saved_model_conversion_v2_test.py | 861 | # Check if AddV2 is fused to Conv2D and Depthwise ops. |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 81 | # Set name to empty to avoid using the default name 'import'. |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 400 | # Check if any TFDF ops are used in the model. |
| LOW | …ensorflowjs/converters/tf_saved_model_conversion_v2.py | 794 | # Check if structure is a simple dictionary. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tfjs-core/src/tensor.ts | 473 | print(verbose = false): void { |
| HIGH | tfjs-core/src/globals.ts | 353 | * @return False if there is already a registered backend under this name, true |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | …on/tensorflowjs/converters/keras_h5_conversion_test.py | 503 | '{"class_name": "Sequential", "keras_version": "2.2.4-tf", "config": {"layers": [{"class_name": "Dense", "config |
| HIGH | …on/tensorflowjs/converters/keras_h5_conversion_test.py | 529 | '{"class_name": "Sequential", "keras_version": "2.2.4-tf", "config": {"layers": [{"class_name": "UnifiedGRU", "c |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …-backend-webgpu/src/matmul_small_output_size_webgpu.ts | 33 | // and handle some elements per thread to optimally utilize the ALU. |
| LOW | tfjs-backend-wasm/tools/cpplint.py | 2572 | # Here we can just use a shallow copy since we are the last |
| MEDIUM | tfjs-react-native/src/camera/camera.ts | 60 | // platform check to be more robust on android devices we may not have |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | .github/workflows/tfjs-release-branch-publish-test.yml | 41 | RELEASE: 'true' # Set RELEASE to true as requested |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-core/src/io/io_utils_test.ts | 623 | const str = '_Lorem ipsum 1337!'; |
| LOW | tfjs-data/src/iterators/string_iterator_test.ts | 22 | const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do |
| LOW | tfjs-data/src/iterators/string_iterator_test.ts | 22 | const lorem = `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …erter/python/tensorflowjs/converters/jax_conversion.py | 125 | # names, you can use `tree.map_structure_with_path` from the `dm-tree` |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tfjs-converter/python/build-pip-package.sh | 22 | # Usage: |