From 33dc0a7e5607aa932b520e47abaee21b5c383843 Mon Sep 17 00:00:00 2001 From: Dayananda-V Date: Wed, 13 Mar 2019 14:22:47 +0530 Subject: [PATCH] TF Lite ambiguous overload fix --- .../lite/kernels/resize_bilinear_test.cc | 30 +++++++++---------- .../kernels/resize_nearest_neighbor_test.cc | 30 +++++++++---------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tensorflow/lite/kernels/resize_bilinear_test.cc b/tensorflow/lite/kernels/resize_bilinear_test.cc index a5ead9c874d..b7b7fcd4157 100644 --- a/tensorflow/lite/kernels/resize_bilinear_test.cc +++ b/tensorflow/lite/kernels/resize_bilinear_test.cc @@ -64,7 +64,7 @@ class ResizeBilinearOpModel : public SingleOpModel { }; TEST(ResizeBilinearOpTest, HorizontalResize) { - ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 1, 2, 1}}); + ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 1, 2, 1}}, {}); m.SetInput({3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -79,7 +79,7 @@ TEST(ResizeBilinearOpTest, HorizontalResize) { } TEST(ResizeBilinearOpTest, HorizontalResizeUInt8) { - ResizeBilinearOpModel m({TensorType_UINT8, {1, 1, 2, 1}}); + ResizeBilinearOpModel m({TensorType_UINT8, {1, 1, 2, 1}}, {}); m.SetInput({3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -94,7 +94,7 @@ TEST(ResizeBilinearOpTest, HorizontalResizeUInt8) { } TEST(ResizeBilinearOpTest, HorizontalResizeInt8) { - ResizeBilinearOpModel m({TensorType_INT8, {1, 1, 2, 1}}); + ResizeBilinearOpModel m({TensorType_INT8, {1, 1, 2, 1}}, {}); m.SetInput({3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -109,7 +109,7 @@ TEST(ResizeBilinearOpTest, HorizontalResizeInt8) { } TEST(ResizeBilinearOpTest, VerticalResize) { - ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 1, 1}}); + ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 1, 1}}, {}); m.SetInput({3, 9}); m.SetSize({3, 1}); m.Invoke(); @@ -124,7 +124,7 @@ TEST(ResizeBilinearOpTest, VerticalResize) { } TEST(ResizeBilinearOpTest, VerticalResizeUInt8) { - ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 1, 1}}); + ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 1, 1}}, {}); m.SetInput({3, 9}); m.SetSize({3, 1}); m.Invoke(); @@ -139,7 +139,7 @@ TEST(ResizeBilinearOpTest, VerticalResizeUInt8) { } TEST(ResizeBilinearOpTest, VerticalResizeInt8) { - ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 1, 1}}); + ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 1, 1}}, {}); m.SetInput({3, 9}); m.SetSize({3, 1}); m.Invoke(); @@ -154,7 +154,7 @@ TEST(ResizeBilinearOpTest, VerticalResizeInt8) { } TEST(ResizeBilinearOpTest, TwoDimensionalResize) { - ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12 // @@ -181,7 +181,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResize) { } TEST(ResizeBilinearOpTest, TwoDimensionalResizeUInt8) { - ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12 // @@ -208,7 +208,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResizeUInt8) { } TEST(ResizeBilinearOpTest, TwoDimensionalResizeInt8) { - ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12 // @@ -235,7 +235,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResizeInt8) { } TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatches) { - ResizeBilinearOpModel m({TensorType_FLOAT32, {2, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_FLOAT32, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12, // @@ -272,7 +272,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatches) { } TEST(ResizeBilinearOpTest, ThreeDimensionalResize) { - ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 2, 2}}); + ResizeBilinearOpModel m({TensorType_FLOAT32, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, 6, 10, // 9, 10, 12, 16, // @@ -299,7 +299,7 @@ TEST(ResizeBilinearOpTest, ThreeDimensionalResize) { } TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatchesUInt8) { - ResizeBilinearOpModel m({TensorType_UINT8, {2, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_UINT8, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12, // @@ -336,7 +336,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatchesUInt8) { } TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatchesInt8) { - ResizeBilinearOpModel m({TensorType_INT8, {2, 2, 2, 1}}); + ResizeBilinearOpModel m({TensorType_INT8, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12, // @@ -373,7 +373,7 @@ TEST(ResizeBilinearOpTest, TwoDimensionalResizeWithTwoBatchesInt8) { } TEST(ResizeBilinearOpTest, ThreeDimensionalResizeUInt8) { - ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 2, 2}}); + ResizeBilinearOpModel m({TensorType_UINT8, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, 6, 10, // 10, 12, 14, 16, // @@ -400,7 +400,7 @@ TEST(ResizeBilinearOpTest, ThreeDimensionalResizeUInt8) { } TEST(ResizeBilinearOpTest, ThreeDimensionalResizeInt8) { - ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 2, 2}}); + ResizeBilinearOpModel m({TensorType_INT8, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, 6, 10, // 10, 12, 14, 16, // diff --git a/tensorflow/lite/kernels/resize_nearest_neighbor_test.cc b/tensorflow/lite/kernels/resize_nearest_neighbor_test.cc index 63b4f13d643..4d4cec9101c 100644 --- a/tensorflow/lite/kernels/resize_nearest_neighbor_test.cc +++ b/tensorflow/lite/kernels/resize_nearest_neighbor_test.cc @@ -64,7 +64,7 @@ class ResizeNearestNeighborOpModel : public SingleOpModel { }; TEST(ResizeNearestNeighborOpTest, HorizontalResize) { - ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 1, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 1, 2, 1}}, {}); m.SetInput({3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -80,7 +80,7 @@ TEST(ResizeNearestNeighborOpTest, HorizontalResize) { } TEST(ResizeNearestNeighborOpTest, HorizontalResizeUInt8) { - ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 1, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 1, 2, 1}}, {}); m.SetInput({3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -96,7 +96,7 @@ TEST(ResizeNearestNeighborOpTest, HorizontalResizeUInt8) { } TEST(ResizeNearestNeighborOpTest, HorizontalResizeInt8) { - ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 1, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 1, 2, 1}}, {}); m.SetInput({-3, 6}); m.SetSize({1, 3}); m.Invoke(); @@ -111,7 +111,7 @@ TEST(ResizeNearestNeighborOpTest, HorizontalResizeInt8) { } TEST(ResizeNearestNeighborOpTest, VerticalResize) { - ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 1, 1}}); + ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 1, 1}}, {}); m.SetInput({3, 9}); m.SetSize({3, 1}); m.Invoke(); @@ -127,7 +127,7 @@ TEST(ResizeNearestNeighborOpTest, VerticalResize) { } TEST(ResizeNearestNeighborOpTest, VerticalResizeUInt8) { - ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 1, 1}}); + ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 1, 1}}, {}); m.SetInput({3, 9}); m.SetSize({3, 1}); m.Invoke(); @@ -143,7 +143,7 @@ TEST(ResizeNearestNeighborOpTest, VerticalResizeUInt8) { } TEST(ResizeNearestNeighborOpTest, VerticalResizeInt8) { - ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 1, 1}}); + ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 1, 1}}, {}); m.SetInput({3, -9}); m.SetSize({3, 1}); m.Invoke(); @@ -158,7 +158,7 @@ TEST(ResizeNearestNeighborOpTest, VerticalResizeInt8) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResize) { - ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12 // @@ -186,7 +186,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResize) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeUInt8) { - ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12 // @@ -214,7 +214,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeUInt8) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeInt8) { - ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 2, 1}}, {}); m.SetInput({ 3, -6, // 9, 12 // @@ -241,7 +241,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeInt8) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatches) { - ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {2, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12, // @@ -279,7 +279,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatches) { } TEST(ResizeNearestNeighborOpTest, ThreeDimensionalResize) { - ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 2, 2}}); + ResizeNearestNeighborOpModel m({TensorType_FLOAT32, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, 6, 10, // 9, 10, 12, 16, // @@ -307,7 +307,7 @@ TEST(ResizeNearestNeighborOpTest, ThreeDimensionalResize) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatchesUInt8) { - ResizeNearestNeighborOpModel m({TensorType_UINT8, {2, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_UINT8, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, 12, // @@ -345,7 +345,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatchesUInt8) { } TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatchesInt8) { - ResizeNearestNeighborOpModel m({TensorType_INT8, {2, 2, 2, 1}}); + ResizeNearestNeighborOpModel m({TensorType_INT8, {2, 2, 2, 1}}, {}); m.SetInput({ 3, 6, // 9, -12, // @@ -382,7 +382,7 @@ TEST(ResizeNearestNeighborOpTest, TwoDimensionalResizeWithTwoBatchesInt8) { } TEST(ResizeNearestNeighborOpTest, ThreeDimensionalResizeUInt8) { - ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 2, 2}}); + ResizeNearestNeighborOpModel m({TensorType_UINT8, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, 6, 10, // 10, 12, 14, 16, // @@ -410,7 +410,7 @@ TEST(ResizeNearestNeighborOpTest, ThreeDimensionalResizeUInt8) { } TEST(ResizeNearestNeighborOpTest, ThreeDimensionalResizeInt8) { - ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 2, 2}}); + ResizeNearestNeighborOpModel m({TensorType_INT8, {1, 2, 2, 2}}, {}); m.SetInput({ 3, 4, -6, 10, // 10, 12, -14, 16, //