MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ZeroNotInQuantizationRangeV2

Function ZeroNotInQuantizationRangeV2

tensorflow/lite/kernels/pad_test.cc:576–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574#ifdef GTEST_HAS_DEATH_TEST
575template <TensorType tensor_dtype>
576void ZeroNotInQuantizationRangeV2() {
577 // The test_util and actual quantization code currently ensure that the range
578 // must include zero, but if that ever changes, this test will catch it.
579 typedef PadV2OpConstModel<float> f;
580 EXPECT_DEATH(f({tensor_dtype, {1, 2, 2, 1}, 1.0, 2.0}, {4, 2},
581 {0, 0, 1, 1, 1, 1, 0, 0}, 0, {tensor_dtype, {}, 1.0, 2.0}),
582 ".*Check failed: f_min <= 0.*");
583}
584
585TEST_F(QuantizedPadV2OpTest, UInt8ZeroNotInQuantizationRange) {
586 ZeroNotInQuantizationRangeV2<TensorType_UINT8>();

Callers

nothing calls this directly

Calls 2

EXPECT_DEATHFunction · 0.85
fFunction · 0.50

Tested by

no test coverage detected