提交 75e3f928 编写于 作者: T Thomas O'Malley 提交者: TensorFlower Gardener

Have `model_to_estimator` make a V2 Estimator if TF2 is enabled.

PiperOrigin-RevId: 258620905
上级 18b2f268
......@@ -103,7 +103,8 @@ def model_to_estimator(
custom_objects=custom_objects,
model_dir=model_dir,
config=config,
checkpoint_format=checkpoint_format)
checkpoint_format=checkpoint_format,
use_v2_estimator=False)
@keras_export('keras.estimator.model_to_estimator', v1=[])
......@@ -161,7 +162,6 @@ def model_to_estimator_v2(
custom_objects=custom_objects,
model_dir=model_dir,
config=config,
checkpoint_format=checkpoint_format)
checkpoint_format=checkpoint_format,
use_v2_estimator=True)
# LINT.ThenChange(//tensorflow_estimator/python/estimator/keras.py)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册