Skip to content

Commit c7f83f7

Browse files
JarnoRFBVijay Vasudevan
authored andcommitted
Replace deprecated tf.op_scope by tf.name_scope (tensorflow#7475)
Since tf.op_scope is deprecated (see https://www.tensorflow.org/api_docs/python/framework/defining_new_operations#op_scope) it should probably be removed from the style guide.
1 parent 37ba478 commit c7f83f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow/g3doc/how_tos/style_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Example:
134134
output_collections=['MY_OPS'], name='add_t1t2')
135135
[2.3, 3.4]
136136
"""
137-
with tf.op_scope([tensor_in, other_tensor_in], name, "my_op"):
137+
with tf.name_scope(name, "my_op", [tensor_in, other_tensor_in]):
138138
tensor_in = tf.convert_to_tensor(tensor_in)
139139
other_tensor_in = tf.convert_to_tensor(other_tensor_in)
140140
result = my_param * tensor_in + other_param * other_tensor_in

0 commit comments

Comments
 (0)