Skip to content

Commit f56237c

Browse files
Vijay Vasudevantensorflower-gardener
authored andcommitted
Remove tf.RegisterShape from public API. No longer needed since
all real shape functions are now registered via the C++ API. Change: 139803467
1 parent d90f6bf commit f56237c

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BUS_ANY was used.
1212
indicating its preferred use in language bindings for TensorFlow.
1313
What was previously `TF_Session` has been renamed to `TF_DeprecatedSession`.
1414
* Renamed TF_Port to TF_Output in the C API.
15+
* Removes RegisterShape from public API. Use C++ shape function registration instead.
1516

1617
# Release 0.11.0
1718

tensorflow/python/framework/framework_lib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
@@RegisterGradient
5454
@@NotDifferentiable
5555
@@NoGradient
56-
@@RegisterShape
5756
@@TensorShape
5857
@@Dimension
5958
@@op_scope

tensorflow/python/framework/importer_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _unknown_shape(op):
141141
op_def_registry.register_op_list(_op_list)
142142
# NOTE(mrry): Dummy shape registrations for ops used in the tests.
143143
for op_def in _op_list.op:
144-
tf.RegisterShape(op_def.name)(None)
144+
ops.RegisterShape(op_def.name)(None)
145145

146146

147147
class ImportGraphDefTest(tf.test.TestCase):

tensorflow/python/framework/ops.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,10 +1571,11 @@ def call_with_requiring(op):
15711571

15721572

15731573
class RegisterShape(object):
1574-
"""A decorator for registering the shape function for an op type.
1574+
"""No longer used. Was: A decorator for registering a shape function.
1575+
1576+
Shape functions must now be registered via the SetShapeFn on the
1577+
original Op specification in C++.
15751578
1576-
Soon to be removed. Shape functions should be registered via
1577-
the SetShapeFn on the original Op specification in C++.
15781579
"""
15791580

15801581
def __init__(self, op_type):

0 commit comments

Comments
 (0)