Update metrics.py with proper import and build deps.
PiperOrigin-RevId: 346432463 Change-Id: I5ededfa14d095b6ed0a15d4401325c69a9a5099a
This commit is contained in:
parent
98a9cbb5f3
commit
38b3c3c83d
tensorflow/python/keras
@ -236,6 +236,7 @@ py_library(
|
||||
],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
":activations",
|
||||
":backend",
|
||||
":losses",
|
||||
"//tensorflow/python:array_ops",
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user