diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-11-16 10:04:44 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-16 10:22:25 -0800 |
commit | eabf41b7cc8ab515b556bc91b4f282d1d671c1a7 (patch) | |
tree | 4d0aa3c4d03470a9c30ff09b4f688b5c06853428 | |
parent | 0f40e96a91a7eeb93aa48aaa52e4b1fbffc3512d (diff) |
Remove explicit calls to call_cpp_shape_fn from third_party/tensorflow/python.
Change: 139345066
-rw-r--r-- | tensorflow/python/ops/array_ops.py | 30 | ||||
-rw-r--r-- | tensorflow/python/ops/resource_variable_ops.py | 10 |
2 files changed, 0 insertions, 40 deletions
diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index 7d76407120..cefd164a74 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -102,7 +102,6 @@ import sys import numpy as np import six -from tensorflow.python.framework import common_shapes from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops @@ -1725,16 +1724,6 @@ def meshgrid(*args, **kwargs): return [x * mult_fact for x in output] -@ops.RegisterShape("Slice") -# pylint: disable=invalid-name -def _DelegateSliceShape(op): - return common_shapes.call_cpp_shape_fn( - op, - input_tensors_needed=[2], - input_tensors_as_shapes_needed=[1]) -# pylint: enable=invalid-name - - NEW_AXIS = -1 SHRINK_AXIS = -2 @@ -1781,25 +1770,6 @@ def _compute_size_of_strided_dim(shrink, spec, size): return unknown # unknown because stride is unknown -@ops.RegisterShape("Fill") -def _DelegateFillShape(op): - return common_shapes.call_cpp_shape_fn( - op, input_tensors_needed=[0], input_tensors_as_shapes_needed=[0]) - - -@ops.RegisterShape("Tile") -def _DelegateTileShape(op): - return common_shapes.call_cpp_shape_fn(op, input_tensors_as_shapes_needed=[1]) - - -@ops.RegisterShape("TileGrad") -def _DelegateTileGradShape(op): - return common_shapes.call_cpp_shape_fn( - op, - input_tensors_as_shapes_needed=[1], - debug_python_shape_fn=_TileGradShape) - - def _TileGradShape(op): """Shape function for the TileGrad op.""" multiples_shape = op.inputs[1].get_shape().with_rank(1) diff --git a/tensorflow/python/ops/resource_variable_ops.py b/tensorflow/python/ops/resource_variable_ops.py index 75980b7d27..8962fe7e4a 100644 --- a/tensorflow/python/ops/resource_variable_ops.py +++ b/tensorflow/python/ops/resource_variable_ops.py @@ -19,7 +19,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function -from tensorflow.python.framework import common_shapes from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.ops import gen_resource_variable_ops @@ -30,15 +29,6 @@ from tensorflow.python.ops import resources from tensorflow.python.ops.gen_resource_variable_ops import * # pylint: enable=wildcard-import -ops.RegisterShape("VarHandleOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("CreateVariableOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("ReadVariableOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("AssignVariableOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("AssignAddVariableOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("VarIsInitializedOp")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("ResourceGather")(common_shapes.call_cpp_shape_fn) -ops.RegisterShape("ResourceScatterAdd")(common_shapes.call_cpp_shape_fn) - def _register_variable_read(read, collections, trainable): """Helper function to put a read from a variable in the collections.""" |