Skip to content

Commit

Permalink
Cast using FunctionType instead of input_signature
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 506724481
  • Loading branch information
faizan-m authored and tensorflower-gardener committed Feb 6, 2023
1 parent d7259ca commit eabec3f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ def test_input_signature_enforced(self):
tf.TensorSpec.from_tensor(x))

state = encoder.initial_state()
with self.assertRaises(ValueError):
with self.assertRaises(TypeError):
bad_x = tf.stack([x, x])
encoder.encode(bad_x, state)
with self.assertRaises(ValueError):
with self.assertRaises(TypeError):
bad_state = state + (x,)
encoder.encode(x, bad_state)
encoded_x = encoder.encode(x, state)
Expand Down

0 comments on commit eabec3f

Please sign in to comment.