Skip to content

Commit

Permalink
Automated rollback of commit 65b507e
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 252924374
  • Loading branch information
k-w-w authored and tensorflower-gardener committed Jun 13, 2019
1 parent 1ae6a2a commit 3dc3b5d
Show file tree
Hide file tree
Showing 7 changed files with 272 additions and 134 deletions.
2 changes: 1 addition & 1 deletion tensorflow/lite/python/lite_v2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ def testMultipleFunctionModel(self):
self.assertIn('This converter can only convert a single ConcreteFunction',
str(error.exception))

@test_util.run_v2_only
def testKerasSequentialModel(self):
"""Test a simple sequential tf.Keras model."""
self.skipTest('b/134660903')
input_data = constant_op.constant(1., shape=[1, 1])

x = np.array([[1.], [2.]])
Expand Down
9 changes: 5 additions & 4 deletions tensorflow/python/eager/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def is_compatible(relaxed, to_check):
for relaxed, to_check in zip(flat_relaxed, flat_to_check))


def _common_shape(x, y):
def common_shape(x, y):
"""Find a `TensorShape` that is compatible with both `x` and `y`."""
if x is None != y is None:
raise RuntimeError(
Expand Down Expand Up @@ -1628,7 +1628,7 @@ def _define_function_with_shape_relaxation(self, args, kwargs):
"relaxed_arg_shapes len: %d vs. %d"
% (len(arg_shapes), len(relaxed_arg_shapes)))
relaxed_arg_shapes = [
_common_shape(x, y) for (x, y) in zip(
common_shape(x, y) for (x, y) in zip(
arg_shapes, relaxed_arg_shapes)]
self._function_cache.arg_relaxed_shapes[rank_only_cache_key] = (
relaxed_arg_shapes)
Expand Down Expand Up @@ -1736,8 +1736,9 @@ def register(func, *args, **kwargs):
def validate_signature(signature):
if any(not isinstance(arg, tensor_spec.TensorSpec)
for arg in nest.flatten(signature, expand_composites=True)):
raise TypeError("Invalid input_signature %s; input_signature must be "
"a possibly nested sequence of TensorSpec objects.")
raise TypeError("Invalid input_signature {}; input_signature must be "
"a possibly nested sequence of TensorSpec objects."
.format(signature))


def defun(func=None,
Expand Down
Loading

0 comments on commit 3dc3b5d

Please sign in to comment.