Validate axis in shape function of tf.reverse (#18024)
* Validate axis in shape function of tf.reverse tf.reverse requires the axis to be in the range of `[-rank(tensor), rank(tensor))`. Previously the validation is only done in runtime though it is possible to validate axis inside the shape function if the shape of the input tensor is already known. This fix add the validation in the shape function. Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Replace with temp variable Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Sanitize with clang-foramt -i Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Validate multiple specification of axis in tf.reverse as well Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add test case for axis validation in shape function for tf.reverse Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Update existing test cases Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment