Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
37536370
Commit
37536370
authored
Aug 17, 2021
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Aug 17, 2021
Browse files
Add a deprecation warning for networks.Classification.
PiperOrigin-RevId: 391455959
parent
555cb706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
official/nlp/modeling/networks/classification.py
official/nlp/modeling/networks/classification.py
+3
-0
No files found.
official/nlp/modeling/networks/classification.py
View file @
37536370
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment