Update metrics.py with proper import and build deps.

PiperOrigin-RevId: 346432463
Change-Id: I5ededfa14d095b6ed0a15d4401325c69a9a5099a
This commit is contained in:
Scott Zhu 2020-12-08 16:12:10 -08:00 committed by TensorFlower Gardener
parent 98a9cbb5f3
commit 38b3c3c83d
2 changed files with 3 additions and 2 deletions
tensorflow/python/keras

View File

@ -236,6 +236,7 @@ py_library(
],
srcs_version = "PY2AND3",
deps = [
":activations",
":backend",
":losses",
"//tensorflow/python:array_ops",

View File

@ -37,8 +37,8 @@ from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_spec
from tensorflow.python.keras import activations
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.activations import sigmoid
from tensorflow.python.keras.engine import base_layer
from tensorflow.python.keras.engine import base_layer_utils
from tensorflow.python.keras.engine import keras_tensor
@ -2134,7 +2134,7 @@ class AUC(Metric):
label_weights = None if self.multi_label else self.label_weights
if self._from_logits:
y_pred = sigmoid(y_pred)
y_pred = activations.sigmoid(y_pred)
with ops.control_dependencies(deps):
return metrics_utils.update_confusion_matrix_variables(