Skip to content

Commit 70731c9

Browse files
fix missing
1 parent 7b66233 commit 70731c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/keras_tests/quantizers_tests/test_activation_inferable_quantizers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ def test_uniform_activation_quantizer(self):
241241
self.assertTrue(quantizer_config['max_range'] == max_range)
242242

243243
# Initialize a random input to quantize between -50 to 50. Input includes positive and negative values.
244-
input_tensor = np.random.rand(1, 50, 50, 3) * 50
245-
signs = np.where(np.indices((1, 50, 50, 3)).sum(axis=0) % 2 == 0, 1, -1).astype(np.int8)
244+
input_tensor = np.random.rand(1, 50, 4, 50) * 50
245+
signs = np.where(np.indices((1, 50, 4, 50)).sum(axis=0) % 2 == 0, 1, -1).astype(np.int8)
246246
input_tensor = tf.constant(input_tensor * signs, dtype=tf.float32)
247247
fake_quantized_tensor = quantizer(input_tensor)
248248

@@ -283,8 +283,8 @@ def test_illegal_range_uniform_activation_quantizer(self):
283283
# self.assertTrue(quantizer_config['max_range'] == max_range)
284284

285285
# Initialize a random input to quantize between -50 to 50. Input includes positive and negative values.
286-
input_tensor = np.random.rand(1, 50, 50, 3) * 50
287-
signs = np.where(np.indices((1, 50, 50, 3)).sum(axis=0) % 2 == 0, 1, -1).astype(np.int8)
286+
input_tensor = np.random.rand(1, 50, 4, 50) * 50
287+
signs = np.where(np.indices((1, 50, 4, 50)).sum(axis=0) % 2 == 0, 1, -1).astype(np.int8)
288288
input_tensor = tf.constant(input_tensor * signs, dtype=tf.float32)
289289
fake_quantized_tensor = quantizer(input_tensor)
290290

0 commit comments

Comments
 (0)