Skip to content

Commit

Permalink
Fix URLs to tensorflow.org guides.
Browse files Browse the repository at this point in the history
In the process of renaming `keras` to `tf_keras`, the URLs to tensorflow.org were modified too. Revert them so that they actually point to the guides.

PiperOrigin-RevId: 592303600
  • Loading branch information
hertschuh authored and tensorflower-gardener committed Dec 19, 2023
1 parent 3c9a51b commit f458edc
Show file tree
Hide file tree
Showing 33 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion tf_keras/backend_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def set_floatx(value):
is using a mix of float16 and float32, can be used by calling
`tf.keras.mixed_precision.set_global_policy('mixed_float16')`. See the
[mixed precision guide](
https://www.tensorflow.org/guide/tf_keras/mixed_precision) for details.
https://www.tensorflow.org/guide/keras/mixed_precision) for details.
Args:
value: String; `'float16'`, `'float32'`, or `'float64'`.
Expand Down
6 changes: 3 additions & 3 deletions tf_keras/engine/base_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ class Layer(tf.Module, version_utils.LayerVersionSelector):
Two reserved keyword arguments you can optionally use in `call()` are:
- `training` (boolean, whether the call is in inference mode or training
mode). See more details in [the layer/model subclassing guide](
https://www.tensorflow.org/guide/tf_keras/custom_layers_and_models#privileged_training_argument_in_the_call_method)
https://www.tensorflow.org/guide/keras/custom_layers_and_models#privileged_training_argument_in_the_call_method)
- `mask` (boolean tensor encoding masked timesteps in the input, used
in RNN layers). See more details in
[the layer/model subclassing guide](
https://www.tensorflow.org/guide/tf_keras/custom_layers_and_models#privileged_mask_argument_in_the_call_method)
https://www.tensorflow.org/guide/keras/custom_layers_and_models#privileged_mask_argument_in_the_call_method)
A typical signature for this method is `call(self, inputs)`, and user
could optionally add `training` and `mask` if the layer need them. `*args`
and `**kwargs` is only useful for future extension when more input
Expand Down Expand Up @@ -300,7 +300,7 @@ def call(self, inputs):
For more information about creating layers, see the guide
[Making new Layers and Models via subclassing](
https://www.tensorflow.org/guide/tf_keras/custom_layers_and_models)
https://www.tensorflow.org/guide/keras/custom_layers_and_models)
"""

@tf.__internal__.tracking.no_automatic_dependency_tracking
Expand Down
4 changes: 2 additions & 2 deletions tf_keras/engine/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def call(self, inputs, training=None, mask=None):
run the `Network` in training mode or inference mode.
mask: A mask or list of masks. A mask can be either a boolean tensor
or None (no mask). For more details, check the guide
[here](https://www.tensorflow.org/guide/tf_keras/masking_and_padding).
[here](https://www.tensorflow.org/guide/keras/masking_and_padding).
Returns:
A tensor if there is a single output, or
Expand Down Expand Up @@ -1121,7 +1121,7 @@ def train_step(self, data):
This method can be overridden to support custom training logic.
For concrete examples of how to override this method see
[Customizing what happens in fit](
https://www.tensorflow.org/guide/tf_keras/customizing_what_happens_in_fit).
https://www.tensorflow.org/guide/keras/customizing_what_happens_in_fit).
This method is called by `Model.make_train_function`.
This method should contain the mathematical logic for one step of
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/core/lambda_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Lambda(Layer):
and Functional API models. `Lambda` layers are best suited for simple
operations or quick experimentation. For more advanced use cases, follow
[this guide](
https://www.tensorflow.org/guide/tf_keras/custom_layers_and_models)
https://www.tensorflow.org/guide/keras/custom_layers_and_models)
for subclassing `tf.keras.layers.Layer`.
WARNING: `tf.keras.layers.Lambda` layers have (de)serialization limitations!
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/core/masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Masking(Layer):
```
See [the masking and padding guide](
https://www.tensorflow.org/guide/tf_keras/masking_and_padding)
https://www.tensorflow.org/guide/keras/masking_and_padding)
for more details.
"""

Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/category_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CategoryEncoding(base_layer.Layer):
use `tf.keras.layers.IntegerLookup` instead.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Examples:
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/discretization.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class Discretization(base_preprocessing_layer.PreprocessingLayer):
element was placed in.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
Any `tf.Tensor` or `tf.RaggedTensor` of dimension 2 or higher.
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/hashed_crossing.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class HashedCrossing(base_layer.Layer):
`()`.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
num_bins: Number of hash bins.
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Hashing(base_layer.Layer):
the `salt` value serving as additional input to the hash function.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
**Example (FarmHash64)**
Expand Down
24 changes: 12 additions & 12 deletions tf_keras/layers/preprocessing/image_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Resizing(base_layer.Layer):
size.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
height: Integer, the height of the output shape.
Expand Down Expand Up @@ -162,7 +162,7 @@ class CenterCrop(base_layer.Layer):
By default, the layer will output floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
3D (unbatched) or 4D (batched) tensor with shape:
Expand Down Expand Up @@ -247,7 +247,7 @@ class RandomCrop(base_layer.BaseRandomLayer):
floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
3D (unbatched) or 4D (batched) tensor with shape:
Expand Down Expand Up @@ -340,7 +340,7 @@ class Rescaling(base_layer.Layer):
floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
Arbitrary.
Expand Down Expand Up @@ -399,7 +399,7 @@ class RandomFlip(base_layer.BaseRandomLayer):
By default, the layer will output floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
3D (unbatched) or 4D (batched) tensor with shape:
Expand Down Expand Up @@ -500,7 +500,7 @@ class RandomTranslation(base_layer.BaseRandomLayer):
floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
height_factor: a float represented as fraction of value, or a tuple of
Expand Down Expand Up @@ -872,7 +872,7 @@ class RandomRotation(base_layer.BaseRandomLayer):
By default, the layer will output floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
3D (unbatched) or 4D (batched) tensor with shape:
Expand Down Expand Up @@ -1014,7 +1014,7 @@ class RandomZoom(base_layer.BaseRandomLayer):
By default, the layer will output floats.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
height_factor: a float represented as fraction of value,
Expand Down Expand Up @@ -1254,7 +1254,7 @@ class RandomContrast(base_layer.BaseRandomLayer):
range of RGB colors.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Input shape:
3D (unbatched) or 4D (batched) tensor with shape:
Expand Down Expand Up @@ -1340,7 +1340,7 @@ class RandomBrightness(base_layer.BaseRandomLayer):
will be apply to each the images in the batch.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
factor: Float or a list/tuple of 2 floats between -1.0 and 1.0. The
Expand Down Expand Up @@ -1497,7 +1497,7 @@ class RandomHeight(base_layer.BaseRandomLayer):
By default, this layer is inactive during inference.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
factor: A positive float (fraction of original height),
Expand Down Expand Up @@ -1616,7 +1616,7 @@ class RandomWidth(base_layer.BaseRandomLayer):
By default, this layer is inactive during inference.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
factor: A positive float (fraction of original width),
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/integer_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class IntegerLookup(index_lookup.IndexLookup):
begin with OOV indices and instances of the mask token will be dropped.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
max_tokens: Maximum size of the vocabulary for this layer. This should
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Normalization(base_preprocessing_layer.PreprocessingLayer):
be called before `fit()`, `evaluate()`, or `predict()`.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
axis: Integer, tuple of integers, or None. The axis or axes that should
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/string_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class StringLookup(index_lookup.IndexLookup):
OOV indices and instances of the mask token will be dropped.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
max_tokens: Maximum size of the vocabulary for this layer. This should
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/preprocessing/text_vectorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class TextVectorization(base_preprocessing_layer.PreprocessingLayer):
site natively compatible with `tf.strings.split()`.
For an overview and full list of preprocessing layers, see the preprocessing
[guide](https://www.tensorflow.org/guide/tf_keras/preprocessing_layers).
[guide](https://www.tensorflow.org/guide/keras/preprocessing_layers).
Args:
max_tokens: Maximum size of the vocabulary for this layer. This should
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/rnn/abstract_rnn_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AbstractRNNCell(base_layer.Layer):
"""Abstract object representing an RNN cell.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
This is the base class for implementing RNN cells with custom behavior.
Expand Down
2 changes: 1 addition & 1 deletion tf_keras/layers/rnn/base_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RNN(base_layer.Layer):
"""Base class for recurrent layers.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
Args:
Expand Down
4 changes: 2 additions & 2 deletions tf_keras/layers/rnn/gru.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GRUCell(DropoutRNNCellMixin, base_layer.BaseRandomLayer):
"""Cell class for the GRU layer.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
This class processes one step within the whole time sequence input, whereas
Expand Down Expand Up @@ -397,7 +397,7 @@ class GRU(DropoutRNNCellMixin, RNN, base_layer.BaseRandomLayer):
"""Gated Recurrent Unit - Cho et al. 2014.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
Based on available runtime hardware and constraints, this layer
Expand Down
4 changes: 2 additions & 2 deletions tf_keras/layers/rnn/lstm.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LSTMCell(DropoutRNNCellMixin, base_layer.BaseRandomLayer):
"""Cell class for the LSTM layer.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
This class processes one step within the whole time sequence input, whereas
Expand Down Expand Up @@ -385,7 +385,7 @@ class LSTM(DropoutRNNCellMixin, RNN, base_layer.BaseRandomLayer):
"""Long Short-Term Memory layer - Hochreiter 1997.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
Based on available runtime hardware and constraints, this layer
Expand Down
4 changes: 2 additions & 2 deletions tf_keras/layers/rnn/simple_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SimpleRNNCell(DropoutRNNCellMixin, base_layer.BaseRandomLayer):
"""Cell class for SimpleRNN.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
This class processes one step within the whole time sequence input, whereas
Expand Down Expand Up @@ -256,7 +256,7 @@ class SimpleRNN(RNN):
"""Fully-connected RNN where the output is to be fed back to input.
See
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/tf_keras/rnn)
[the TF-Keras RNN API guide](https://www.tensorflow.org/guide/keras/rnn)
for details about the usage of RNN API.
Args:
Expand Down
14 changes: 7 additions & 7 deletions tf_keras/legacy_tf_layers/convolutional.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def conv1d(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -551,7 +551,7 @@ def conv2d(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -841,7 +841,7 @@ def conv3d(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -1304,7 +1304,7 @@ def separable_conv1d(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -1475,7 +1475,7 @@ def separable_conv2d(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -1746,7 +1746,7 @@ def conv2d_transpose(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down Expand Up @@ -2002,7 +2002,7 @@ def conv3d_transpose(
After:
To migrate code using TF1 functional layers use the [Keras Functional API]
(https://www.tensorflow.org/guide/tf_keras/functional):
(https://www.tensorflow.org/guide/keras/functional):
```python
x = tf.keras.Input((28, 28, 1))
Expand Down
Loading

0 comments on commit f458edc

Please sign in to comment.