Add additional error string for non-broadcastable shapes

For generated kernels in Tensorflow, the error message will be different, so add an additional string option. This error will be the same in every way to the previous error other than the exact message.

PiperOrigin-RevId: 355341373
Change-Id: I4e8ee24df7e6e9072614d1c7a968c3a429bf7380
This commit is contained in:
Tres Popp 2021-02-03 00:42:00 -08:00 committed by TensorFlower Gardener
parent 238f47d671
commit a3778c649c

View File

@ -219,7 +219,8 @@ class ComparisonOpTest(test.TestCase):
with self.subTest(t=t, f=f):
with self.assertRaisesRegex(
(ValueError, errors.InvalidArgumentError),
"Incompatible shapes|Dimensions must be equal"):
"Incompatible shapes|Dimensions must be equal|"
"required broadcastable shapes"):
f(x.astype(t), y.astype(t))