提交 2438f7bc 编辑于 作者: Zachary Garrett's avatar Zachary Garrett 提交者: tensorflow-copybara
浏览文件

Remove spurious check for compiled Keras model during metrics property.

Compiled keras models are not supported and rejected during construction for many months now.

PiperOrigin-RevId: 344858495
上级 5ec5b2ac
......@@ -304,10 +304,7 @@ class _KerasModel(model_lib.Model):
return local_variables
def get_metrics(self):
if not self._keras_model._is_compiled: # pylint: disable=protected-access
return self._metrics + [self._loss_metric]
else:
return self._keras_model.metrics + [self._loss_metric]
return self._metrics + [self._loss_metric]
@property
def input_spec(self):
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册