Skip to content

Commit

Permalink
Update docstring links to keras.io for keras guides (keras-team#608)
Browse files Browse the repository at this point in the history
Wherever possible, we will point keras.io to the keras.io versions
of the guides (rather than the tensorflow.org version).
  • Loading branch information
mattdangerw authored Aug 27, 2021
1 parent a2884da commit ff6e4ee
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions scripts/autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,18 +765,14 @@ def set_active_flag_in_nav_entry(entry, relative_url):


def replace_links(content):
content = content.replace(
"https://www.tensorflow.org/guide/keras/custom_layers_and_models",
"https://keras.io/guides/making_new_layers_and_models_via_subclassing/",
)
content = content.replace(
"https://www.tensorflow.org/guide/keras/masking_and_padding",
"https://keras.io/guides/understanding_masking_and_padding/",
)
content = content.replace(
"https://www.tensorflow.org/guide/keras/rnn",
"https://keras.io/guides/working_with_rnns/",
)
# Make sure all Keras guides point to keras.io.
for entry in generate_tf_guides.CONFIG:
keras_name = entry["source_name"]
tf_name = entry["target_name"]
content = content.replace(
"https://www.tensorflow.org/guide/keras/" + tf_name,
"https://keras.io/guides/" + keras_name,
)
return content


Expand Down

0 comments on commit ff6e4ee

Please sign in to comment.