Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 563905885
  • Loading branch information
tensorflower-gardener authored and sampathweb committed Sep 11, 2023
1 parent 94a1712 commit 6add81a
Show file tree
Hide file tree
Showing 2,391 changed files with 134,710 additions and 134,547 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/00-bug-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VER

**Describe the problem**.

Describe the problem clearly here. Be sure to convey here why it's a bug in Keras or why the requested feature is needed.
Describe the problem clearly here. Be sure to convey here why it's a bug in TF-Keras or why the requested feature is needed.

**Describe the current behavior**.


**Describe the expected behavior**.

**[Contributing](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md)**.
**[Contributing](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md)**.

- Do you want to contribute a PR? (yes/no):
- If yes, please read [this page](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md) for instructions
- If yes, please read [this page](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md) for instructions
- Briefly describe your candidate solution(if contributing):

**Standalone code to reproduce the issue**.
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/10-feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Describe the feature clearly here. Be sure to convey here why the requested feat
**Who will benefit from this feature?**


**[Contributing](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md)**
**[Contributing](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md)**

- Do you want to contribute a PR? (yes/no):
- If yes, please read [this page](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md) for instructions
- If yes, please read [this page](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md) for instructions
- Briefly describe your candidate solution(if contributing):
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/20-documentation-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ Are there currently visuals? If not, will it clarify the content?

**Submit a pull request?**.

Are you planning to also submit a pull request to fix the issue? See the [docs contributor guide](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md):
Are you planning to also submit a pull request to fix the issue? See the [docs contributor guide](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md):


2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
This is a pull request automatically created by a Github Action to format the code.
If there is any conflict, click the run workflow button on
[this page](https://github.com/keras-team/keras/actions/workflows/format.yml).
[this page](https://github.com/keras-team/tf-keras/actions/workflows/format.yml).
labels: |
ready to pull
draft: false
42 changes: 21 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pull request. A team member will take care of the merging.

![Ready to pull](https://i.imgur.com/yCEqJsA.png)

Here is an [example pull request](https://github.com/keras-team/keras/pull/15015)
Here is an [example pull request](https://github.com/keras-team/tf-keras/pull/15015)
for your reference.

## Setup environment
Expand All @@ -68,7 +68,7 @@ to setup a local environment by installing the dev tools needed.
### Option 1: Use a Docker container

We provide a
[Dockerfile](https://github.com/keras-team/keras/blob/master/.devcontainer/Dockerfile)
[Dockerfile](https://github.com/keras-team/tf-keras/blob/master/.devcontainer/Dockerfile)
to build the dev environment. You can build the Dockerfile into a Docker image
named `keras-dev` with the following command at the root directory of your
cloned repo.
Expand All @@ -79,18 +79,18 @@ docker build -t keras-dev .devcontainer

You can launch a Docker container from the image with the following command. The
`-it` option gives you an interactive shell of the container. The `-v
path/to/repo/:/home/keras/` mounts your cloned repo to the container. Replace
path/to/repo/:/home/tf_keras/` mounts your cloned repo to the container. Replace
`path/to/repo` with the path to your cloned repo directory.

```shell
docker run -it -v path/to/repo/:/home/keras/ keras-dev
docker run -it -v path/to/repo/:/home/tf_keras/ keras-dev
```

In the container shell, you need to install the latest dependencies with the
following command.

```shell
pip install -r /home/keras/requirements.txt && pip uninstall keras-nightly -y
pip install -r /home/tf_keras/requirements.txt && pip uninstall keras-nightly -y
```

Now, the environment setup is complete. You are ready to run the tests.
Expand All @@ -107,14 +107,14 @@ with setup instructions.

To setup your local dev environment, you will need the following tools.

1. [Bazel](https://bazel.build/) is the tool to build and test Keras. See the
1. [Bazel](https://bazel.build/) is the tool to build and test TF-Keras. See the
[installation guide](https://docs.bazel.build/versions/4.0.0/install.html)
for how to install and config bazel for your local environment.
2. [git](https://github.com/) for code repository management.
3. [python](https://www.python.org/) to build and code in Keras.
3. [python](https://www.python.org/) to build and code in TF-Keras.

The following commands check the tools above are successfully installed. Note
that Keras requires at least Python 3.7 to run.
that TF-Keras requires at least Python 3.7 to run.

```shell
bazel --version
Expand Down Expand Up @@ -146,7 +146,7 @@ venv_dir\Scripts\activate.bat # for Windows
Clone your forked repo to your local machine. Go to the cloned directory to
install the dependencies into the venv. Since `tf-nightly` uses `keras-nightly`
as a dependency, we need to uninstall `keras-nightly` so that tests will run
against Keras code in the local workspace.
against TF-Keras code in the local workspace.

```shell
git clone https://github.com/YOUR_GITHUB_USERNAME/keras.git
Expand All @@ -165,9 +165,9 @@ pip install --upgrade tf-nightly

## Code style

The Keras uses [Black](https://black.readthedocs.io/en/stable/) and
The TF-Keras uses [Black](https://black.readthedocs.io/en/stable/) and
[isort](https://pycqa.github.io/isort/) to format the code. Please refer to
[requirements.txt](https://github.com/keras-team/keras/blob/master/requirements.txt)
[requirements.txt](https://github.com/keras-team/tf-keras/blob/master/requirements.txt)
for the required versions. Run the following command **at the root directory of
the repo** to format your code.

Expand Down Expand Up @@ -199,7 +199,7 @@ A **class docstring** may contain the following items:
* Optional `Raises` section for possible errors.

You can check out `MultiHeadAttention` as an example
[(link)](https://github.com/keras-team/keras/blob/v2.12.0-rc1/keras/layers/attention/multi_head_attention.py#L131).
[(link)](https://github.com/keras-team/tf-keras/blob/v2.12.0-rc1/tf_keras/layers/attention/multi_head_attention.py#L131).

A **function docstring** may contain the following items:

Expand All @@ -211,7 +211,7 @@ A **function docstring** may contain the following items:
* Optional `Raises` section for possible errors.

You can check out `text_dataset_from_directory` as an example
[(link)](https://github.com/keras-team/keras/blob/v2.12.0-rc1/keras/utils/text_dataset.py#L31).
[(link)](https://github.com/keras-team/tf-keras/blob/v2.12.0-rc1/tf_keras/utils/text_dataset.py#L31).


## Run tests
Expand Down Expand Up @@ -267,22 +267,22 @@ command above.
However, it may slow down the tests for not running in parallel
and may cause the test to timeout.

## Contributing to Keras applications
## Contributing to TF-Keras applications

Contributions to the
[pre-trained application library](https://keras.io/api/applications/) are
welcome. Code for Keras applications is located in Keras repository in
[keras/applications](https://github.com/keras-team/keras/blob/master/keras/applications).
When contributing to Keras applications, please keep following checklist in
welcome. Code for TF-Keras applications is located in TF-Keras repository in
[keras/applications](https://github.com/keras-team/tf-keras/blob/master/tf_keras/applications).
When contributing to TF-Keras applications, please keep following checklist in
mind.

- Keras applications must implement an established and widely used model.
- TF-Keras applications must implement an established and widely used model.
Applications should include a link to a paper describing the architecture of
the model with at least 20 citations.
- Applications should be provided with pre-trained weights.
- When submitting a pull request for a Keras application, these weights
- When submitting a pull request for a TF-Keras application, these weights
can be provided at any publically available URL (e.g. a personal Cloud
Storage bucket). The weights will be uploaded to a Keras storage bucket
Storage bucket). The weights will be uploaded to a TF-Keras storage bucket
while merging the pull request.
- Weights should be downloaded with the
[get_file()](https://keras.io/api/utils/python_utils/#getfile-function)
Expand Down Expand Up @@ -312,5 +312,5 @@ mind.

## Security vulnerability reports

Since Keras is the high-level API of TensorFlow 2, Keras follows same security practices as TensorFlow.
Since TF-Keras is the high-level API of TensorFlow 2, TF-Keras follows same security practices as TensorFlow.
For details on guidelines on vulnerabilities and reporting them, you can refer [Using TensorFlow Securely](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md).
4 changes: 2 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you open a GitHub issue, here is our policy:
documentation (for small docs fixes please send a PR instead).
2. The form below must be filled out.

**Here's why we have that policy**: Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
**Here's why we have that policy**: TF-Keras developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.

------------------------

Expand All @@ -35,7 +35,7 @@ python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VER
```

### Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in Keras or why the requested feature is needed.
Describe the problem clearly here. Be sure to convey here why it's a bug in TF-Keras or why the requested feature is needed.

### Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Keras logo](https://s3.amazonaws.com/keras.io/img/keras-logo-2018-large-1200.png)

This repository hosts the development of the Keras library.
This repository hosts the development of the TF-Keras library.
Read the documentation at [keras.io](https://keras.io/).

## About Keras
Expand All @@ -12,26 +12,26 @@ running on top of the machine learning platform [TensorFlow](https://github.com/
It was developed with a focus on enabling fast experimentation and
providing a delightful developer experience.

**The purpose of Keras is to give an *unfair advantage* to any developer looking to ship ML-powered apps.**
**The purpose of TF-Keras is to give an *unfair advantage* to any developer looking to ship ML-powered apps.**

Keras is:

- **Simple** -- but not simplistic. Keras reduces developer *cognitive load*
- **Simple** -- but not simplistic. TF-Keras reduces developer *cognitive load*
to free you to focus on the parts of the problem that really matter.
Keras focuses on ease of use, debugging speed, code elegance & conciseness,
TF-Keras focuses on ease of use, debugging speed, code elegance & conciseness,
maintainability, and deployability (via TFServing, TFLite, TF.js).
- **Flexible** -- Keras adopts the principle of *progressive disclosure of
- **Flexible** -- TF-Keras adopts the principle of *progressive disclosure of
complexity*: simple workflows should be quick and easy, while arbitrarily
advanced workflows should be *possible* via a clear path that builds upon
what you've already learned.
- **Powerful** -- Keras provides industry-strength performance and
- **Powerful** -- TF-Keras provides industry-strength performance and
scalability: it is used by organizations and companies including NASA,
YouTube, and Waymo. That's right -- your YouTube recommendations are
powered by Keras, and so is the world's most advanced driverless vehicle.

---

## Keras & TensorFlow 2
## TF-Keras & TensorFlow 2

[TensorFlow 2](https://www.tensorflow.org/) is an end-to-end, open-source machine learning platform.
You can think of it as an infrastructure layer for
Expand All @@ -49,14 +49,14 @@ with a focus on modern deep learning. It provides essential abstractions and bui
and shipping machine learning solutions with high iteration velocity.

Keras empowers engineers and researchers to take full advantage of the scalability
and cross-platform capabilities of TensorFlow 2: you can run Keras on TPU or on large clusters of GPUs,
and you can export your Keras models to run in the browser or on a mobile device.
and cross-platform capabilities of TensorFlow 2: you can run TF-Keras on TPU or on large clusters of GPUs,
and you can export your TF-Keras models to run in the browser or on a mobile device.

---

## First contact with Keras

The core data structures of Keras are __layers__ and __models__.
The core data structures of TF-Keras are __layers__ and __models__.
The simplest type of model is the [`Sequential` model](https://keras.io/guides/sequential_model/), a linear stack of layers.
For more complex architectures, you should use the [Keras functional API](https://keras.io/guides/functional_api/),
which allows you to build arbitrary graphs of layers or [write models entirely from scratch via subclassing](https://keras.io/guides/making_new_layers_and_models_via_subclassing/).
Expand Down Expand Up @@ -86,7 +86,7 @@ model.compile(loss='categorical_crossentropy',
metrics=['accuracy'])
```

If you need to, you can further configure your optimizer. The Keras philosophy is to keep simple things simple,
If you need to, you can further configure your optimizer. The TF-Keras philosophy is to keep simple things simple,
while allowing the user to be fully in control when they need to be (the ultimate control being the easy extensibility of the source code via subclassing).

```python
Expand Down Expand Up @@ -114,16 +114,16 @@ Or generate predictions on new data:
classes = model.predict(x_test, batch_size=128)
```

What you just saw is the most elementary way to use Keras.
What you just saw is the most elementary way to use TF-Keras.

However, Keras is also a highly-flexible framework suitable to iterate on state-of-the-art research ideas.
However, TF-Keras is also a highly-flexible framework suitable to iterate on state-of-the-art research ideas.
Keras follows the principle of **progressive disclosure of complexity**: it makes it easy to get started,
yet it makes it possible to handle arbitrarily advanced use cases,
only requiring incremental learning at each step.

In pretty much the same way that you were able to train & evaluate a simple neural network above in a few lines,
you can use Keras to quickly develop new training procedures or exotic model architectures.
Here's a low-level training loop example, combining Keras functionality with the TensorFlow `GradientTape`:
you can use TF-Keras to quickly develop new training procedures or exotic model architectures.
Here's a low-level training loop example, combining TF-Keras functionality with the TensorFlow `GradientTape`:

```python
import tensorflow as tf
Expand All @@ -150,8 +150,8 @@ for inputs, targets in dataset:

For more in-depth tutorials about Keras, you can check out:

- [Introduction to Keras for engineers](https://keras.io/getting_started/intro_to_keras_for_engineers/)
- [Introduction to Keras for researchers](https://keras.io/getting_started/intro_to_keras_for_researchers/)
- [Introduction to TF-Keras for engineers](https://keras.io/getting_started/intro_to_keras_for_engineers/)
- [Introduction to TF-Keras for researchers](https://keras.io/getting_started/intro_to_keras_for_researchers/)
- [Developer guides](https://keras.io/guides/)
- [Other learning resources](https://keras.io/getting_started/learning_resources/)

Expand All @@ -161,10 +161,10 @@ For more in-depth tutorials about Keras, you can check out:

Keras comes packaged with TensorFlow 2 as `tensorflow.keras`.
To start using Keras, simply [install TensorFlow 2](https://www.tensorflow.org/install).
You can then import Keras as follows:
You can then import TF-Keras as follows:

```python
from tensorflow import keras
from tensorflow import tf_keras as keras
```

---
Expand All @@ -173,7 +173,7 @@ from tensorflow import keras

Keras has **nightly releases** (`keras-nightly` on PyPI)
and **stable releases** (`keras` on PyPI).
The nightly Keras releases are usually compatible with the corresponding version
The nightly TF-Keras releases are usually compatible with the corresponding version
of the `tf-nightly` releases
(e.g. `keras-nightly==2.7.0.dev2021100607` should be
used with `tf-nightly==2.7.0.dev2021100607`).
Expand All @@ -182,11 +182,11 @@ For stable releases, each Keras
version maps to a specific stable version of TensorFlow.

The table below shows the compatibility version mapping
between TensorFlow versions and Keras versions.
between TensorFlow versions and TF-Keras versions.

All the release branches can be found on [GitHub](https://github.com/keras-team/keras/releases).
All the release branches can be found on [GitHub](https://github.com/keras-team/tf-keras/releases).

All the release binaries can be found on [Pypi](https://pypi.org/project/keras/#history).
All the release binaries can be found on [Pypi](https://pypi.org/project/tf_keras/#history).

---
## Support
Expand All @@ -201,13 +201,13 @@ You can ask questions and join the development discussion:
## Opening an issue

You can also post **bug reports and feature requests** (only)
in [GitHub issues](https://github.com/keras-team/keras/issues).
in [GitHub issues](https://github.com/keras-team/tf-keras/issues).


---

## Opening a PR

We welcome contributions! Before opening a PR, please read
[our contributor guide](https://github.com/keras-team/keras/blob/master/CONTRIBUTING.md),
[our contributor guide](https://github.com/keras-team/tf-keras/blob/master/CONTRIBUTING.md),
and the [API design guideline](https://github.com/keras-team/governance/blob/master/keras_api_design_guidelines.md).
Loading

0 comments on commit 6add81a

Please sign in to comment.