Deprecate arg_min and arg_max in the TF 2.0 API.
PiperOrigin-RevId: 222125023
This commit is contained in:
parent
c5695df38c
commit
ea3ee9804d
@ -51,8 +51,8 @@ linspace = gen_math_ops.lin_space
|
|||||||
|
|
||||||
arg_max = deprecation.deprecated(None, "Use `tf.math.argmax` instead")(arg_max) # pylint: disable=used-before-assignment
|
arg_max = deprecation.deprecated(None, "Use `tf.math.argmax` instead")(arg_max) # pylint: disable=used-before-assignment
|
||||||
arg_min = deprecation.deprecated(None, "Use `tf.math.argmin` instead")(arg_min) # pylint: disable=used-before-assignment
|
arg_min = deprecation.deprecated(None, "Use `tf.math.argmin` instead")(arg_min) # pylint: disable=used-before-assignment
|
||||||
tf_export("arg_max")(arg_max)
|
tf_export(v1=["arg_max"])(arg_max)
|
||||||
tf_export("arg_min")(arg_min)
|
tf_export(v1=["arg_min"])(arg_min)
|
||||||
|
|
||||||
# This is set by resource_variable_ops.py. It is included in this way since
|
# This is set by resource_variable_ops.py. It is included in this way since
|
||||||
# there is a circular dependency between math_ops and resource_variable_ops
|
# there is a circular dependency between math_ops and resource_variable_ops
|
||||||
|
@ -444,14 +444,6 @@ tf_module {
|
|||||||
name: "add_n"
|
name: "add_n"
|
||||||
argspec: "args=[\'inputs\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], "
|
argspec: "args=[\'inputs\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], "
|
||||||
}
|
}
|
||||||
member_method {
|
|
||||||
name: "arg_max"
|
|
||||||
argspec: "args=[\'input\', \'dimension\', \'output_type\', \'name\'], varargs=None, keywords=None, defaults=[\"<dtype: \'int64\'>\", \'None\'], "
|
|
||||||
}
|
|
||||||
member_method {
|
|
||||||
name: "arg_min"
|
|
||||||
argspec: "args=[\'input\', \'dimension\', \'output_type\', \'name\'], varargs=None, keywords=None, defaults=[\"<dtype: \'int64\'>\", \'None\'], "
|
|
||||||
}
|
|
||||||
member_method {
|
member_method {
|
||||||
name: "argmax"
|
name: "argmax"
|
||||||
argspec: "args=[\'input\', \'axis\', \'output_type\', \'name\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'int64\'>\", \'None\'], "
|
argspec: "args=[\'input\', \'axis\', \'output_type\', \'name\'], varargs=None, keywords=None, defaults=[\'None\', \"<dtype: \'int64\'>\", \'None\'], "
|
||||||
|
@ -70,6 +70,8 @@ renames = {
|
|||||||
'tf.all_variables': 'tf.compat.v1.all_variables',
|
'tf.all_variables': 'tf.compat.v1.all_variables',
|
||||||
'tf.angle': 'tf.math.angle',
|
'tf.angle': 'tf.math.angle',
|
||||||
'tf.app.run': 'tf.compat.v1.app.run',
|
'tf.app.run': 'tf.compat.v1.app.run',
|
||||||
|
'tf.arg_max': 'tf.compat.v1.arg_max',
|
||||||
|
'tf.arg_min': 'tf.compat.v1.arg_min',
|
||||||
'tf.assert_greater_equal': 'tf.compat.v1.assert_greater_equal',
|
'tf.assert_greater_equal': 'tf.compat.v1.assert_greater_equal',
|
||||||
'tf.assert_integer': 'tf.compat.v1.assert_integer',
|
'tf.assert_integer': 'tf.compat.v1.assert_integer',
|
||||||
'tf.assert_less_equal': 'tf.compat.v1.assert_less_equal',
|
'tf.assert_less_equal': 'tf.compat.v1.assert_less_equal',
|
||||||
@ -562,7 +564,7 @@ renames = {
|
|||||||
'tf.variable_scope': 'tf.compat.v1.variable_scope',
|
'tf.variable_scope': 'tf.compat.v1.variable_scope',
|
||||||
'tf.variables_initializer': 'tf.compat.v1.variables_initializer',
|
'tf.variables_initializer': 'tf.compat.v1.variables_initializer',
|
||||||
'tf.variance_scaling_initializer': 'tf.keras.initializers.VarianceScaling',
|
'tf.variance_scaling_initializer': 'tf.keras.initializers.VarianceScaling',
|
||||||
'tf.verify_tensor_all_finite': 'tf.debugging.assert_all_finite',
|
'tf.verify_tensor_all_finite': 'tf.compat.v1.verify_tensor_all_finite',
|
||||||
'tf.wrap_function': 'tf.compat.v1.wrap_function',
|
'tf.wrap_function': 'tf.compat.v1.wrap_function',
|
||||||
'tf.write_file': 'tf.io.write_file',
|
'tf.write_file': 'tf.io.write_file',
|
||||||
'tf.zeta': 'tf.math.zeta'
|
'tf.zeta': 'tf.math.zeta'
|
||||||
|
@ -145,6 +145,8 @@ class TFAPIChangeSpec(ast_edits.APIChangeSpec):
|
|||||||
"tf.multinomial": "tf.random.categorical",
|
"tf.multinomial": "tf.random.categorical",
|
||||||
"tf.random.multinomial": "tf.random.categorical",
|
"tf.random.multinomial": "tf.random.categorical",
|
||||||
"tf.load_file_system_library": "tf.load_library",
|
"tf.load_file_system_library": "tf.load_library",
|
||||||
|
"tf.arg_max": "tf.argmax",
|
||||||
|
"tf.arg_min": "tf.argmin",
|
||||||
})
|
})
|
||||||
# pylint: enable=line-too-long
|
# pylint: enable=line-too-long
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user