Remove warning about changing the model when a checkpoint exists
This message is frequently intepreted as an error by users. If the
user changed the model, there will be an error when loading the
checkpoint anyway.
@@ -101,17 +101,8 @@ def load_model(model_dir,
"""
if model_file and model_name:
raise ValueError("only one of model_file and model_name should be set")
- model_name_or_path = model_file or model_name
model_description_path = os.path.join(model_dir, "model_description.py")
- if model_name_or_path:
- if tf.train.latest_checkpoint(model_dir) is not None:
- tf.get_logger().warning(
- "You provided a model configuration but a checkpoint already exists. "
- "The model configuration must define the same model as the one used for "
- "the initial training. However, you can change non structural values like "
- "dropout.")
-
if model_file:
model = load_model_from_file(model_file, as_builder=as_builder)
if serialize_model:
