text
stringlengths
5
261k
id
stringlengths
16
106
metadata
dict
__index_level_0__
int64
0
266
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/layers/__init__.py/0
{ "file_path": "keras-nlp/keras_nlp/layers/__init__.py", "repo_id": "keras-nlp", "token_count": 582 }
136
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/layers/modeling/sine_position_encoding.py/0
{ "file_path": "keras-nlp/keras_nlp/layers/modeling/sine_position_encoding.py", "repo_id": "keras-nlp", "token_count": 1533 }
137
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/layers/preprocessing/random_deletion.py/0
{ "file_path": "keras-nlp/keras_nlp/layers/preprocessing/random_deletion.py", "repo_id": "keras-nlp", "token_count": 4721 }
138
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/metrics/rouge_n.py/0
{ "file_path": "keras-nlp/keras_nlp/metrics/rouge_n.py", "repo_id": "keras-nlp", "token_count": 1766 }
139
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/albert/albert_tokenizer_test.py/0
{ "file_path": "keras-nlp/keras_nlp/models/albert/albert_tokenizer_test.py", "repo_id": "keras-nlp", "token_count": 1001 }
140
# Copyright 2024 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/gemma/gemma_causal_lm_preprocessor_test.py/0
{ "file_path": "keras-nlp/keras_nlp/models/gemma/gemma_causal_lm_preprocessor_test.py", "repo_id": "keras-nlp", "token_count": 1604 }
141
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/gpt2/gpt2_causal_lm_preprocessor_test.py/0
{ "file_path": "keras-nlp/keras_nlp/models/gpt2/gpt2_causal_lm_preprocessor_test.py", "repo_id": "keras-nlp", "token_count": 1770 }
142
# Copyright 2022 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/gpt_neo_x/gpt_neo_x_preprocessor.py/0
{ "file_path": "keras-nlp/keras_nlp/models/gpt_neo_x/gpt_neo_x_preprocessor.py", "repo_id": "keras-nlp", "token_count": 2258 }
143
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/opt/opt_causal_lm_preprocessor_test.py/0
{ "file_path": "keras-nlp/keras_nlp/models/opt/opt_causal_lm_preprocessor_test.py", "repo_id": "keras-nlp", "token_count": 1742 }
144
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/task_test.py/0
{ "file_path": "keras-nlp/keras_nlp/models/task_test.py", "repo_id": "keras-nlp", "token_count": 1416 }
145
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/models/xlnet/xlnet_content_and_query_embedding.py/0
{ "file_path": "keras-nlp/keras_nlp/models/xlnet/xlnet_content_and_query_embedding.py", "repo_id": "keras-nlp", "token_count": 2124 }
146
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/samplers/top_p_sampler.py/0
{ "file_path": "keras-nlp/keras_nlp/samplers/top_p_sampler.py", "repo_id": "keras-nlp", "token_count": 1677 }
147
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/keras_nlp/tokenizers/word_piece_tokenizer_test.py/0
{ "file_path": "keras-nlp/keras_nlp/tokenizers/word_piece_tokenizer_test.py", "repo_id": "keras-nlp", "token_count": 4220 }
148
[tool.black] line-length = 80 [tool.isort] profile = "black" force_single_line = "True" known_first_party = ["keras_nlp", "tests"] default_section = "THIRDPARTY" line_length = 80
keras-nlp/pyproject.toml/0
{ "file_path": "keras-nlp/pyproject.toml", "repo_id": "keras-nlp", "token_count": 71 }
149
# Copyright 2023 The KerasNLP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
keras-nlp/tools/checkpoint_conversion/convert_mistral_checkpoints.py/0
{ "file_path": "keras-nlp/tools/checkpoint_conversion/convert_mistral_checkpoints.py", "repo_id": "keras-nlp", "token_count": 5801 }
150
"""Enables dynamic setting of underlying Keras module. """ _KERAS_BACKEND = None _KERAS_UTILS = None def set_keras_submodules(backend, utils): # Deprecated, will be removed in the future. global _KERAS_BACKEND global _KERAS_UTILS _KERAS_BACKEND = backend _KERAS_UTILS = utils def get_keras_submo...
keras-preprocessing/keras_preprocessing/__init__.py/0
{ "file_path": "keras-preprocessing/keras_preprocessing/__init__.py", "repo_id": "keras-preprocessing", "token_count": 670 }
151
import numpy as np import pytest from PIL import Image from keras_preprocessing.image import image_data_generator, utils @pytest.fixture(scope='module') def all_test_images(): img_w = img_h = 20 rgb_images = [] rgba_images = [] gray_images = [] for n in range(8): bias = np.random.rand(img...
keras-preprocessing/tests/image/image_data_generator_test.py/0
{ "file_path": "keras-preprocessing/tests/image/image_data_generator_test.py", "repo_id": "keras-preprocessing", "token_count": 8328 }
152
# Security Policy If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. You may su...
keras-tuner/SECURITY.md/0
{ "file_path": "keras-tuner/SECURITY.md", "repo_id": "keras-tuner", "token_count": 178 }
153
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-tuner/keras_tuner/applications/augment_test.py/0
{ "file_path": "keras-tuner/keras_tuner/applications/augment_test.py", "repo_id": "keras-tuner", "token_count": 2658 }
154
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-tuner/keras_tuner/distribute/oracle_chief.py/0
{ "file_path": "keras-tuner/keras_tuner/distribute/oracle_chief.py", "repo_id": "keras-tuner", "token_count": 1297 }
155
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-tuner/keras_tuner/engine/hyperparameters/hp_types/choice_hp.py/0
{ "file_path": "keras-tuner/keras_tuner/engine/hyperparameters/hp_types/choice_hp.py", "repo_id": "keras-tuner", "token_count": 2500 }
156
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-tuner/keras_tuner/engine/metrics_tracking_test.py/0
{ "file_path": "keras-tuner/keras_tuner/engine/metrics_tracking_test.py", "repo_id": "keras-tuner", "token_count": 4057 }
157
# Copyright 2019 The KerasTuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
keras-tuner/keras_tuner/test_utils/mock_distribute.py/0
{ "file_path": "keras-tuner/keras_tuner/test_utils/mock_distribute.py", "repo_id": "keras-tuner", "token_count": 1764 }
158
import argparse import glob import os import shutil import namex package = "keras_tuner" build_directory = "build" dist_directory = "dist" to_copy = [ "setup.py", "setup.cfg", "README.md", ] def ignore_files(_, filenames): return [f for f in filenames if "test" in f] def build(): if os.path.ex...
keras-tuner/pip_build.py/0
{ "file_path": "keras-tuner/pip_build.py", "repo_id": "keras-tuner", "token_count": 1213 }
159
"""Tests for tf.distribute related functionality under tf implementation.""" import numpy as np import pytest import tensorflow as tf from tensorflow.python.eager import context from keras import backend from keras import layers from keras import models from keras import testing from keras.backend.tensorflow import t...
keras/keras/backend/tensorflow/distribute_test.py/0
{ "file_path": "keras/keras/backend/tensorflow/distribute_test.py", "repo_id": "keras", "token_count": 2037 }
160
import tensorflow as tf from keras.utils import tracking class KerasAutoTrackable(tf.__internal__.tracking.AutoTrackable): """Manages dependencies on other objects with Keras tracking. Similar to TF AutoTrackable, but disabling tracking is based on tracking within Keras. This serves as an interface...
keras/keras/backend/tensorflow/trackable.py/0
{ "file_path": "keras/keras/backend/tensorflow/trackable.py", "repo_id": "keras", "token_count": 768 }
161
import numpy as np import pytest from keras import models from keras import testing from keras.callbacks.callback import Callback class CallbackTest(testing.TestCase): @pytest.mark.requires_trainable_backend def test_model_state_is_current_on_epoch_end(self): class TestModel(models.Model): ...
keras/keras/callbacks/callback_test.py/0
{ "file_path": "keras/keras/callbacks/callback_test.py", "repo_id": "keras", "token_count": 468 }
162
import warnings from unittest import mock import numpy as np from keras import backend from keras import callbacks from keras import layers from keras import testing from keras.models import Sequential from keras.utils import numerical_utils try: import requests except ImportError: requests = None class Te...
keras/keras/callbacks/remote_monitor_test.py/0
{ "file_path": "keras/keras/callbacks/remote_monitor_test.py", "repo_id": "keras", "token_count": 1740 }
163
import re import numpy as np from keras import activations from keras import constraints from keras import initializers from keras import ops from keras import regularizers from keras.api_export import keras_export from keras.layers.layer import Layer @keras_export("keras.layers.EinsumDense") class EinsumDense(Laye...
keras/keras/layers/core/einsum_dense.py/0
{ "file_path": "keras/keras/layers/core/einsum_dense.py", "repo_id": "keras", "token_count": 7413 }
164
import os import numpy as np import pytest from absl.testing import parameterized from tensorflow import data as tf_data from keras import backend from keras import layers from keras import models from keras import testing from keras.saving import saving_api class DiscretizationTest(testing.TestCase, parameterized....
keras/keras/layers/preprocessing/discretization_test.py/0
{ "file_path": "keras/keras/layers/preprocessing/discretization_test.py", "repo_id": "keras", "token_count": 3613 }
165
import numpy as np import pytest from keras import backend from keras import layers from keras.testing import test_case class SpatialDropoutTest(test_case.TestCase): @pytest.mark.requires_trainable_backend def test_spatial_dropout_1d(self): self.run_layer_test( layers.SpatialDropout1D, ...
keras/keras/layers/regularization/spatial_dropout_test.py/0
{ "file_path": "keras/keras/layers/regularization/spatial_dropout_test.py", "repo_id": "keras", "token_count": 1761 }
166
from keras import ops from keras.api_export import keras_export from keras.layers.input_spec import InputSpec from keras.layers.layer import Layer @keras_export("keras.layers.UpSampling1D") class UpSampling1D(Layer): """Upsampling layer for 1D inputs. Repeats each temporal step `size` times along the time ax...
keras/keras/layers/reshaping/up_sampling1d.py/0
{ "file_path": "keras/keras/layers/reshaping/up_sampling1d.py", "repo_id": "keras", "token_count": 731 }
167
import numpy as np import pytest from keras import initializers from keras import layers from keras import testing class SimpleRNNTest(testing.TestCase): @pytest.mark.requires_trainable_backend def test_basics(self): self.run_layer_test( layers.SimpleRNN, init_kwargs={"units":...
keras/keras/layers/rnn/simple_rnn_test.py/0
{ "file_path": "keras/keras/layers/rnn/simple_rnn_test.py", "repo_id": "keras", "token_count": 5507 }
168
import json import os import warnings import numpy as np from absl import logging from keras import backend from keras import optimizers from keras.backend.common import global_state from keras.legacy.saving import json_utils from keras.legacy.saving import saving_options from keras.legacy.saving import saving_utils ...
keras/keras/legacy/saving/legacy_h5_format.py/0
{ "file_path": "keras/keras/legacy/saving/legacy_h5_format.py", "repo_id": "keras", "token_count": 10858 }
169
import numpy as np from absl.testing import parameterized from keras import testing from keras.metrics import f_score_metrics class FBetaScoreTest(parameterized.TestCase, testing.TestCase): def _run_test( self, y_true, y_pred, sample_weights, average, beta, ...
keras/keras/metrics/f_score_metrics_test.py/0
{ "file_path": "keras/keras/metrics/f_score_metrics_test.py", "repo_id": "keras", "token_count": 5700 }
170
import numpy as np import pytest import tree from absl.testing import parameterized from keras import layers from keras import models from keras import testing from keras.models.cloning import clone_model def get_mlp_functional_model(shared_layers=False): inputs = layers.Input(shape=(3,)) x = layers.Dense(2)...
keras/keras/models/cloning_test.py/0
{ "file_path": "keras/keras/models/cloning_test.py", "repo_id": "keras", "token_count": 1812 }
171
from keras import backend from keras.api_export import keras_export from keras.backend import KerasTensor from keras.backend import any_symbolic_tensors from keras.ops.operation import Operation from keras.ops.operation_utils import reduce_shape class Cholesky(Operation): def __init__(self): super().__ini...
keras/keras/ops/linalg.py/0
{ "file_path": "keras/keras/ops/linalg.py", "repo_id": "keras", "token_count": 8541 }
172
from keras.api_export import keras_export from keras.optimizers.adadelta import Adadelta from keras.optimizers.adafactor import Adafactor from keras.optimizers.adagrad import Adagrad from keras.optimizers.adam import Adam from keras.optimizers.adamax import Adamax from keras.optimizers.adamw import AdamW from keras.opt...
keras/keras/optimizers/__init__.py/0
{ "file_path": "keras/keras/optimizers/__init__.py", "repo_id": "keras", "token_count": 1497 }
173
from keras import ops from keras.api_export import keras_export from keras.optimizers import optimizer @keras_export(["keras.optimizers.Lion"]) class Lion(optimizer.Optimizer): """Optimizer that implements the Lion algorithm. The Lion optimizer is a stochastic-gradient-descent method that uses the sign o...
keras/keras/optimizers/lion.py/0
{ "file_path": "keras/keras/optimizers/lion.py", "repo_id": "keras", "token_count": 2224 }
174
"""Object config serialization and deserialization logic.""" import importlib import inspect import types import warnings import numpy as np from keras import api_export from keras import backend from keras.api_export import keras_export from keras.backend.common import global_state from keras.saving import object_r...
keras/keras/saving/serialization_lib.py/0
{ "file_path": "keras/keras/saving/serialization_lib.py", "repo_id": "keras", "token_count": 12690 }
175
import multiprocessing.dummy import queue import random import threading import time import warnings import weakref from contextlib import closing import numpy as np import tree from keras import backend from keras.api_export import keras_export from keras.trainers.data_adapters import data_adapter_utils from keras.t...
keras/keras/trainers/data_adapters/py_dataset_adapter.py/0
{ "file_path": "keras/keras/trainers/data_adapters/py_dataset_adapter.py", "repo_id": "keras", "token_count": 9208 }
176
import os import sys from io import StringIO from keras.testing import test_case from keras.utils.code_stats import count_loc class TestCountLoc(test_case.TestCase): def setUp(self): self.test_dir = "test_directory" os.makedirs(self.test_dir, exist_ok=True) def tearDown(self): for ro...
keras/keras/utils/code_stats_test.py/0
{ "file_path": "keras/keras/utils/code_stats_test.py", "repo_id": "keras", "token_count": 2502 }
177
from keras.testing import test_case from keras.utils import naming class NamingUtilsTest(test_case.TestCase): def test_uniquify_unique_name(self): name = "the_unique_name" unique_name = naming.uniquify(name) self.assertEqual(unique_name, name) def test_auto_name(self): self.as...
keras/keras/utils/naming_test.py/0
{ "file_path": "keras/keras/utils/naming_test.py", "repo_id": "keras", "token_count": 1909 }
178
from keras.utils.module_utils import tensorflow as tf def expand_dims(inputs, axis): """Expand dims on sparse, ragged, or dense tensors.""" if isinstance(inputs, tf.SparseTensor): return tf.sparse.expand_dims(inputs, axis) else: return tf.expand_dims(inputs, axis) def sparse_bincount(inp...
keras/keras/utils/tf_utils.py/0
{ "file_path": "keras/keras/utils/tf_utils.py", "repo_id": "keras", "token_count": 2013 }
179
[flake8] ignore = # Conflicts with black E203 # defaults flake8 ignores E121,E123,E126,E226,E24,E704,W503,W504 # Function name should be lowercase N802 # lowercase ... imported as non lowercase # Useful to ignore for "import keras.backend as K" N812 # do not use bare 'except' ...
keras/setup.cfg/0
{ "file_path": "keras/setup.cfg", "repo_id": "keras", "token_count": 289 }
180
{ "python.linting.flake8Enabled": true, "python.linting.pylintEnabled": false, "python.linting.enabled": true, "editor.rulers": [ 80 ], "editor.formatOnSave": true, "python.formatting.provider": "black", "python.formatting.blackArgs": [ "--line-length", "80" ], "python.sortImports....
tf-keras/.vscode/settings.json/0
{ "file_path": "tf-keras/.vscode/settings.json", "repo_id": "tf-keras", "token_count": 260 }
181
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/activations.py/0
{ "file_path": "tf-keras/tf_keras/activations.py", "repo_id": "tf-keras", "token_count": 9022 }
182
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/applications/efficientnet.py/0
{ "file_path": "tf-keras/tf_keras/applications/efficientnet.py", "repo_id": "tf-keras", "token_count": 12097 }
183
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/benchmarks/keras_examples_benchmarks/bidirectional_lstm_benchmark_test.py/0
{ "file_path": "tf-keras/tf_keras/benchmarks/keras_examples_benchmarks/bidirectional_lstm_benchmark_test.py", "repo_id": "tf-keras", "token_count": 2382 }
184
# Description: # Implementation of TF-Keras benchmarks. # Placeholder: load unaliased py_library load("@org_keras//tf_keras:tf_keras.bzl", "cuda_py_test") package( # copybara:uncomment default_applicable_licenses = ["//tf_keras:license"], default_visibility = ["//visibility:public"], licenses = ["notice...
tf-keras/tf_keras/benchmarks/saved_model_benchmarks/BUILD/0
{ "file_path": "tf-keras/tf_keras/benchmarks/saved_model_benchmarks/BUILD", "repo_id": "tf-keras", "token_count": 2015 }
185
# Description: # Contains the TF-Keras datasets package (internal TensorFlow version). # Placeholder: load unaliased py_library package( # copybara:uncomment default_applicable_licenses = ["//tf_keras:license"], default_visibility = [ "//tf_keras:friends", ], licenses = ["notice"], ) py_lib...
tf-keras/tf_keras/datasets/BUILD/0
{ "file_path": "tf-keras/tf_keras/datasets/BUILD", "repo_id": "tf-keras", "token_count": 398 }
186
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/distribute/custom_training_loop_metrics_test.py/0
{ "file_path": "tf-keras/tf_keras/distribute/custom_training_loop_metrics_test.py", "repo_id": "tf-keras", "token_count": 1964 }
187
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/distribute/keras_image_model_correctness_test.py/0
{ "file_path": "tf-keras/tf_keras/distribute/keras_image_model_correctness_test.py", "repo_id": "tf-keras", "token_count": 3252 }
188
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/distribute/multi_worker_test.py/0
{ "file_path": "tf-keras/tf_keras/distribute/multi_worker_test.py", "repo_id": "tf-keras", "token_count": 8086 }
189
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/engine/functional.py/0
{ "file_path": "tf-keras/tf_keras/engine/functional.py", "repo_id": "tf-keras", "token_count": 31491 }
190
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/engine/sequential_test.py/0
{ "file_path": "tf-keras/tf_keras/engine/sequential_test.py", "repo_id": "tf-keras", "token_count": 10831 }
191
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/engine/training_v1.py/0
{ "file_path": "tf-keras/tf_keras/engine/training_v1.py", "repo_id": "tf-keras", "token_count": 70865 }
192
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/feature_column/sequence_feature_column_test.py/0
{ "file_path": "tf-keras/tf_keras/feature_column/sequence_feature_column_test.py", "repo_id": "tf-keras", "token_count": 20779 }
193
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/integration_test/function_test.py/0
{ "file_path": "tf-keras/tf_keras/integration_test/function_test.py", "repo_id": "tf-keras", "token_count": 4301 }
194
import tensorflow as tf from tensorflow import keras from tf_keras.integration_test.models.input_spec import InputSpec def get_data_spec(batch_size): return ( { "num_cat_feat": InputSpec( (batch_size,), dtype="int32", range=[0, 5] ), "string_cat_feat": ...
tf-keras/tf_keras/integration_test/models/structured_data_classification.py/0
{ "file_path": "tf-keras/tf_keras/integration_test/models/structured_data_classification.py", "repo_id": "tf-keras", "token_count": 1396 }
195
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/integration_test/saved_model_test.py/0
{ "file_path": "tf-keras/tf_keras/integration_test/saved_model_test.py", "repo_id": "tf-keras", "token_count": 4332 }
196
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/attention/attention_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/attention/attention_test.py", "repo_id": "tf-keras", "token_count": 12767 }
197
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/convolutional/conv_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/convolutional/conv_test.py", "repo_id": "tf-keras", "token_count": 12416 }
198
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/core/embedding_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/core/embedding_test.py", "repo_id": "tf-keras", "token_count": 5002 }
199
# Description: # Contains the TF-Keras locally-connected layers. # Placeholder: load unaliased py_library load("@org_keras//tf_keras:tf_keras.bzl", "tf_py_test") package( # copybara:uncomment default_applicable_licenses = ["//tf_keras:license"], default_visibility = [ "//tf_keras:friends", ], ...
tf-keras/tf_keras/layers/locally_connected/BUILD/0
{ "file_path": "tf-keras/tf_keras/layers/locally_connected/BUILD", "repo_id": "tf-keras", "token_count": 1159 }
200
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/merging/multiply.py/0
{ "file_path": "tf-keras/tf_keras/layers/merging/multiply.py", "repo_id": "tf-keras", "token_count": 1140 }
201
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/normalization/unit_normalization_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/normalization/unit_normalization_test.py", "repo_id": "tf-keras", "token_count": 1201 }
202
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/pooling/global_average_pooling_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/pooling/global_average_pooling_test.py", "repo_id": "tf-keras", "token_count": 3137 }
203
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/preprocessing/benchmarks/normalization_adapt_benchmark.py/0
{ "file_path": "tf-keras/tf_keras/layers/preprocessing/benchmarks/normalization_adapt_benchmark.py", "repo_id": "tf-keras", "token_count": 1916 }
204
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/preprocessing/index_lookup.py/0
{ "file_path": "tf-keras/tf_keras/layers/preprocessing/index_lookup.py", "repo_id": "tf-keras", "token_count": 19702 }
205
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/preprocessing/text_vectorization.py/0
{ "file_path": "tf-keras/tf_keras/layers/preprocessing/text_vectorization.py", "repo_id": "tf-keras", "token_count": 12182 }
206
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/regularization/spatial_dropout2d.py/0
{ "file_path": "tf-keras/tf_keras/layers/regularization/spatial_dropout2d.py", "repo_id": "tf-keras", "token_count": 1204 }
207
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/rnn/base_rnn_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/rnn/base_rnn_test.py", "repo_id": "tf-keras", "token_count": 40626 }
208
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/rnn/gru_lstm_test.py/0
{ "file_path": "tf-keras/tf_keras/layers/rnn/gru_lstm_test.py", "repo_id": "tf-keras", "token_count": 3243 }
209
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/layers/rnn/time_distributed.py/0
{ "file_path": "tf-keras/tf_keras/layers/rnn/time_distributed.py", "repo_id": "tf-keras", "token_count": 6969 }
210
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/legacy_tf_layers/normalization.py/0
{ "file_path": "tf-keras/tf_keras/legacy_tf_layers/normalization.py", "repo_id": "tf-keras", "token_count": 8887 }
211
# Copyright 2023 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/metrics/f_score_metrics.py/0
{ "file_path": "tf-keras/tf_keras/metrics/f_score_metrics.py", "repo_id": "tf-keras", "token_count": 5569 }
212
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/mixed_precision/autocast_variable.py/0
{ "file_path": "tf-keras/tf_keras/mixed_precision/autocast_variable.py", "repo_id": "tf-keras", "token_count": 8979 }
213
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/optimizers/adafactor.py/0
{ "file_path": "tf-keras/tf_keras/optimizers/adafactor.py", "repo_id": "tf-keras", "token_count": 4143 }
214
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/optimizers/legacy/ftrl.py/0
{ "file_path": "tf-keras/tf_keras/optimizers/legacy/ftrl.py", "repo_id": "tf-keras", "token_count": 5730 }
215
"""Tests for calling optimizer on ParameterServerStrategy.""" import os import tensorflow.compat.v2 as tf from absl.testing import parameterized import tf_keras as keras from tf_keras.optimizers import adadelta from tf_keras.optimizers import adagrad from tf_keras.optimizers import adam from tf_keras.optimizers impo...
tf-keras/tf_keras/optimizers/optimizer_pss_test.py/0
{ "file_path": "tf-keras/tf_keras/optimizers/optimizer_pss_test.py", "repo_id": "tf-keras", "token_count": 4723 }
216
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/premade_models/wide_deep_test.py/0
{ "file_path": "tf-keras/tf_keras/premade_models/wide_deep_test.py", "repo_id": "tf-keras", "token_count": 6609 }
217
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/testing_infra/test_utils.py/0
{ "file_path": "tf-keras/tf_keras/testing_infra/test_utils.py", "repo_id": "tf-keras", "token_count": 17000 }
218
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/tests/model_subclassing_compiled_test.py/0
{ "file_path": "tf-keras/tf_keras/tests/model_subclassing_compiled_test.py", "repo_id": "tf-keras", "token_count": 8038 }
219
#!/usr/bin/env bash # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
tf-keras/tf_keras/tools/pip_package/build_pip_package.sh/0
{ "file_path": "tf-keras/tf_keras/tools/pip_package/build_pip_package.sh", "repo_id": "tf-keras", "token_count": 1651 }
220
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/utils/dataset_utils.py/0
{ "file_path": "tf-keras/tf_keras/utils/dataset_utils.py", "repo_id": "tf-keras", "token_count": 12231 }
221
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/utils/layer_utils.py/0
{ "file_path": "tf-keras/tf_keras/utils/layer_utils.py", "repo_id": "tf-keras", "token_count": 18042 }
222
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tf-keras/tf_keras/utils/text_dataset_test.py/0
{ "file_path": "tf-keras/tf_keras/utils/text_dataset_test.py", "repo_id": "tf-keras", "token_count": 5771 }
223