Commit 37536370 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Add a deprecation warning for networks.Classification.

PiperOrigin-RevId: 391455959
parent 555cb706
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# pylint: disable=g-classes-have-attributes # pylint: disable=g-classes-have-attributes
import collections import collections
import tensorflow as tf import tensorflow as tf
from tensorflow.python.util import deprecation
@tf.keras.utils.register_keras_serializable(package='Text') @tf.keras.utils.register_keras_serializable(package='Text')
...@@ -39,6 +40,8 @@ class Classification(tf.keras.Model): ...@@ -39,6 +40,8 @@ class Classification(tf.keras.Model):
`predictions`. `predictions`.
""" """
@deprecation.deprecated(None, 'Classification as a network is deprecated. '
'Please use the layers.ClassificationHead instead.')
def __init__(self, def __init__(self,
input_width, input_width,
num_classes, num_classes,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment