Fix QuantizedAvgPool invalid rank issue.
Passing in an invalid rank in eager mode led to a runtime crash. Updated the runtime error to match the one generated by the shape function for better consistency. PiperOrigin-RevId: 462419362
Showing
- tensorflow/core/kernels/quantized_pooling_ops.cc 30 additions, 18 deletionstensorflow/core/kernels/quantized_pooling_ops.cc
- tensorflow/core/kernels/quantized_pooling_ops_test.cc 4 additions, 4 deletionstensorflow/core/kernels/quantized_pooling_ops_test.cc
- tensorflow/python/kernel_tests/quantization_ops/quantization_ops_test.py 66 additions, 0 deletions...on/kernel_tests/quantization_ops/quantization_ops_test.py
Please register or sign in to comment