diff --git a/tensorflow/python/framework/graph_util_impl.py b/tensorflow/python/framework/graph_util_impl.py index f0cd1647d0e..62964384c71 100644 --- a/tensorflow/python/framework/graph_util_impl.py +++ b/tensorflow/python/framework/graph_util_impl.py @@ -53,7 +53,7 @@ def _is_variable_op(op): @deprecation.deprecated( date=None, - instructions="Use tf.compat.v1.graph_util.must_run_on_cpu") + instructions="Use `tf.compat.v1.graph_util.must_run_on_cpu`") @tf_export(v1=["graph_util.must_run_on_cpu"]) def must_run_on_cpu(node, pin_variables_on_cpu=False): """Returns True if the given node_def must run on CPU, otherwise False. @@ -156,7 +156,7 @@ def _bfs_for_reachable_nodes(target_nodes, name_to_input_name): @deprecation.deprecated( date=None, - instructions="Use tf.compat.v1.graph_util.extract_sub_graph") + instructions="Use `tf.compat.v1.graph_util.extract_sub_graph`") @tf_export(v1=["graph_util.extract_sub_graph"]) def extract_sub_graph(graph_def, dest_nodes): """Extract the subgraph that can reach any of the nodes in 'dest_nodes'. @@ -197,7 +197,8 @@ def extract_sub_graph(graph_def, dest_nodes): @deprecation.deprecated( date=None, - instructions="Use tf.compat.v1.graph_util.tensor_shape_from_node_def_name") + instructions="Use `tf.compat.v1.graph_util.tensor_shape_from_node_def_name`" +) @tf_export(v1=["graph_util.tensor_shape_from_node_def_name"]) def tensor_shape_from_node_def_name(graph, input_name): """Convenience function to get a shape from a NodeDef's input string.""" @@ -215,7 +216,7 @@ def tensor_shape_from_node_def_name(graph, input_name): @deprecation.deprecated( date=None, - instructions="Use tf.compat.v1.graph_util.convert_variables_to_constants") + instructions="Use `tf.compat.v1.graph_util.convert_variables_to_constants`") @tf_export(v1=["graph_util.convert_variables_to_constants"]) def convert_variables_to_constants(sess, input_graph_def, @@ -305,7 +306,7 @@ def convert_variables_to_constants(sess, @deprecation.deprecated( date=None, - instructions="Use tf.compat.v1.graph_util.remove_training_nodes") + instructions="Use `tf.compat.v1.graph_util.remove_training_nodes`") @tf_export(v1=["graph_util.remove_training_nodes"]) def remove_training_nodes(input_graph, protected_nodes=None): """Prunes out nodes that aren't needed for inference. diff --git a/tensorflow/python/framework/load_library.py b/tensorflow/python/framework/load_library.py index 727f6aa44c2..a31146008cc 100644 --- a/tensorflow/python/framework/load_library.py +++ b/tensorflow/python/framework/load_library.py @@ -84,7 +84,8 @@ def load_op_library(library_filename): return module -@deprecation.deprecated(date=None, instructions='Use tf.load_library instead.') +@deprecation.deprecated(date=None, + instructions='Use `tf.load_library` instead.') @tf_export(v1=['load_file_system_library']) def load_file_system_library(library_filename): """Loads a TensorFlow plugin, containing file system implementation. diff --git a/tensorflow/python/layers/convolutional.py b/tensorflow/python/layers/convolutional.py index 03344c844d3..f88934122fc 100644 --- a/tensorflow/python/layers/convolutional.py +++ b/tensorflow/python/layers/convolutional.py @@ -117,7 +117,7 @@ class Conv1D(keras_layers.Conv1D, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.Conv1D instead.') + instructions='Use `tf.keras.layers.Conv1D` instead.') @tf_export(v1=['layers.conv1d']) def conv1d(inputs, filters, @@ -316,7 +316,7 @@ class Conv2D(keras_layers.Conv2D, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.Conv2D instead.') + instructions='Use `tf.keras.layers.Conv2D` instead.') @tf_export(v1=['layers.conv2d']) def conv2d(inputs, filters, @@ -523,7 +523,7 @@ class Conv3D(keras_layers.Conv3D, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.Conv3D instead.') + instructions='Use `tf.keras.layers.Conv3D` instead.') @tf_export(v1=['layers.conv3d']) def conv3d(inputs, filters, @@ -853,7 +853,7 @@ class SeparableConv2D(keras_layers.SeparableConv2D, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.SeparableConv1D instead.') + instructions='Use `tf.keras.layers.SeparableConv1D` instead.') @tf_export(v1=['layers.separable_conv1d']) def separable_conv1d(inputs, filters, @@ -973,7 +973,7 @@ def separable_conv1d(inputs, @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.SeparableConv2D instead.') + instructions='Use `tf.keras.layers.SeparableConv2D` instead.') @tf_export(v1=['layers.separable_conv2d']) def separable_conv2d(inputs, filters, @@ -1183,7 +1183,7 @@ class Conv2DTranspose(keras_layers.Conv2DTranspose, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.Conv2DTranspose instead.') + instructions='Use `tf.keras.layers.Conv2DTranspose` instead.') @tf_export(v1=['layers.conv2d_transpose']) def conv2d_transpose(inputs, filters, @@ -1363,7 +1363,7 @@ class Conv3DTranspose(keras_layers.Conv3DTranspose, base.Layer): @deprecation.deprecated( date=None, - instructions='Use tf.keras.layers.Conv3DTranspose instead.') + instructions='Use `tf.keras.layers.Conv3DTranspose` instead.') @tf_export(v1=['layers.conv3d_transpose']) def conv3d_transpose(inputs, filters, diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py index ddb39922215..a5c0055a535 100644 --- a/tensorflow/python/ops/math_ops.py +++ b/tensorflow/python/ops/math_ops.py @@ -704,7 +704,7 @@ def saturate_cast(value, dtype, name=None): name="max")) return cast(value, dtype, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_float"]) def to_float(x, name="ToFloat"): """Casts a tensor to type `float32`. @@ -723,7 +723,7 @@ def to_float(x, name="ToFloat"): return cast(x, dtypes.float32, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_double"]) def to_double(x, name="ToDouble"): """Casts a tensor to type `float64`. @@ -742,7 +742,7 @@ def to_double(x, name="ToDouble"): return cast(x, dtypes.float64, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_int32"]) def to_int32(x, name="ToInt32"): """Casts a tensor to type `int32`. @@ -761,7 +761,7 @@ def to_int32(x, name="ToInt32"): return cast(x, dtypes.int32, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_int64"]) def to_int64(x, name="ToInt64"): """Casts a tensor to type `int64`. @@ -780,7 +780,7 @@ def to_int64(x, name="ToInt64"): return cast(x, dtypes.int64, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_bfloat16"]) def to_bfloat16(x, name="ToBFloat16"): """Casts a tensor to type `bfloat16`. @@ -799,7 +799,7 @@ def to_bfloat16(x, name="ToBFloat16"): return cast(x, dtypes.bfloat16, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_complex64"]) def to_complex64(x, name="ToComplex64"): """Casts a tensor to type `complex64`. @@ -818,7 +818,7 @@ def to_complex64(x, name="ToComplex64"): return cast(x, dtypes.complex64, name=name) -@deprecation.deprecated(date=None, instructions="Use tf.cast instead.") +@deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") @tf_export(v1=["to_complex128"]) def to_complex128(x, name="ToComplex128"): """Casts a tensor to type `complex128`. diff --git a/tensorflow/python/ops/partitioned_variables.py b/tensorflow/python/ops/partitioned_variables.py index c1084c25592..50e89e7220a 100644 --- a/tensorflow/python/ops/partitioned_variables.py +++ b/tensorflow/python/ops/partitioned_variables.py @@ -240,7 +240,7 @@ def fixed_size_partitioner(num_shards, axis=0): @tf_export(v1=["create_partitioned_variables"]) @deprecation.deprecated( date=None, - instructions="Use tf.get_variable with a partitioner set.") + instructions="Use `tf.get_variable` with a partitioner set.") def create_partitioned_variables( shape, slicing, initializer, dtype=dtypes.float32, trainable=True, collections=None, name=None, reuse=None): diff --git a/tensorflow/python/ops/random_ops.py b/tensorflow/python/ops/random_ops.py index 62e2f6d1025..cd332ede178 100644 --- a/tensorflow/python/ops/random_ops.py +++ b/tensorflow/python/ops/random_ops.py @@ -329,7 +329,7 @@ def random_crop(value, size, seed=None, name=None): @tf_export(v1=["random.multinomial", "multinomial"]) @deprecation.deprecated( - date=None, instructions="Use tf.random.categorical instead.") + date=None, instructions="Use `tf.random.categorical` instead.") def multinomial(logits, num_samples, seed=None, name=None, output_dtype=None): """Draws samples from a multinomial distribution. diff --git a/tensorflow/python/ops/stateless_random_ops.py b/tensorflow/python/ops/stateless_random_ops.py index b119049b163..0576f6e933c 100644 --- a/tensorflow/python/ops/stateless_random_ops.py +++ b/tensorflow/python/ops/stateless_random_ops.py @@ -182,7 +182,7 @@ def stateless_truncated_normal(shape, @tf_export(v1=["random.stateless_multinomial"]) @deprecation.deprecated( - date=None, instructions="Use tf.random.stateless_categorical instead.") + date=None, instructions="Use `tf.random.stateless_categorical` instead.") def stateless_multinomial(logits, num_samples, seed, diff --git a/tensorflow/python/training/checkpoint_management.py b/tensorflow/python/training/checkpoint_management.py index 21fa6b3b5d3..131ecf71ba5 100644 --- a/tensorflow/python/training/checkpoint_management.py +++ b/tensorflow/python/training/checkpoint_management.py @@ -124,8 +124,8 @@ def generate_checkpoint_state_proto(save_dir, @deprecation.deprecated( date=None, - instructions=("Use tf.train.CheckpointManager to manage checkpoints rather " - "than manually editing the Checkpoint proto.")) + instructions=("Use `tf.train.CheckpointManager` to manage checkpoints " + "rather than manually editing the Checkpoint proto.")) @tf_export(v1=["train.update_checkpoint_state"]) def update_checkpoint_state(save_dir, model_checkpoint_path,