Add script to automate Keras release.
PiperOrigin-RevId: 512325363
This commit is contained in:
parent
09c2eaaf26
commit
2dcab061e2
@ -37,6 +37,7 @@ FLAGS = flags.FLAGS
|
||||
flags.DEFINE_string("model", None, "The model to run memory profiler.")
|
||||
|
||||
|
||||
def main(_):
|
||||
@memory_profiler.profile
|
||||
def _imdb_lstm_model():
|
||||
"""LSTM model."""
|
||||
@ -53,8 +54,6 @@ def _imdb_lstm_model():
|
||||
# Warm up the model with one epoch.
|
||||
model.fit(x_train, y_train, batch_size=512, epochs=3)
|
||||
|
||||
|
||||
def main(_):
|
||||
# Add the model for memory profile.
|
||||
models = {
|
||||
"lstm": _imdb_lstm_model,
|
||||
|
@ -54,7 +54,7 @@ TMP_TEST_DIRNAME = "keras_test"
|
||||
VERBOSE = True
|
||||
INIT_FILE_HEADER = """AUTOGENERATED. DO NOT EDIT."""
|
||||
# These are symbols that have export issues and that we skip for now.
|
||||
SYMBOLS_TO_SKIP = []
|
||||
SYMBOLS_TO_SKIP = ["layer_test"]
|
||||
|
||||
|
||||
def copy_keras_codebase(source_dir, target_dir):
|
||||
@ -235,11 +235,11 @@ def generate_keras_api_files(package_directory, src_directory):
|
||||
root_offset=["api", "_v1", "keras"],
|
||||
)
|
||||
# Add missing __init__ files in api dirs.
|
||||
with open(os.path.join(package_directory, "api", "__init__.py"), "w") as f:
|
||||
with open(os.path.join(package_directory, "api", "__init__.py"), "w"):
|
||||
pass
|
||||
with open(os.path.join(v1_path, "__init__.py"), "w") as f:
|
||||
with open(os.path.join(v1_path, "__init__.py"), "w"):
|
||||
pass
|
||||
with open(os.path.join(v2_path, "__init__.py"), "w") as f:
|
||||
with open(os.path.join(v2_path, "__init__.py"), "w"):
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user