From eabec3f2f0ab972819466c2c1a0131aa42d13d40 Mon Sep 17 00:00:00 2001 From: Faizan Muhammad Date: Thu, 2 Feb 2023 14:30:40 -0800 Subject: [PATCH] Cast using FunctionType instead of input_signature PiperOrigin-RevId: 506724481 --- .../core/internal/tensor_encoding/core/simple_encoder_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder_test.py b/tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder_test.py index 5c644c8d2..87e996fd5 100644 --- a/tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder_test.py +++ b/tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder_test.py @@ -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)