Fix tolerance too tight for Wasserstein distance test.
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 2 Feb 2018 05:43:12 +0000 (21:43 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 2 Feb 2018 18:32:17 +0000 (10:32 -0800)
PiperOrigin-RevId: 184240222

tensorflow/contrib/lite/BUILD
tensorflow/contrib/lite/arena_planner_test.cc
tensorflow/contrib/lite/kernels/strided_slice_test.cc
tensorflow/contrib/lite/tools/BUILD
tensorflow/contrib/lite/tools/verifier_test.cc

index 2009b3b05d273475d1ef180cded9e2fa66cd6ff4..13350c5a438b75fe14e8753e5bb1bb77ec8f655b 100644 (file)
@@ -53,8 +53,6 @@ cc_test(
     srcs = ["arena_planner_test.cc"],
     deps = [
         ":arena_planner",
-        "//tensorflow/contrib/lite/testing:util",
-        "//tensorflow/core:lib",
         "@com_google_googletest//:gtest",
     ],
 )
index e10611e6d431f563209d5b59440461f80fdb58f9..c27c327abc63d7bd1e3912d368a1dacb62c50ca8 100644 (file)
@@ -18,8 +18,6 @@ limitations under the License.
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
-#include "tensorflow/contrib/lite/testing/util.h"
-#include "tensorflow/core/platform/logging.h"
 
 namespace tflite {
 namespace {
@@ -466,7 +464,9 @@ TEST_F(ArenaPlannerTest, LargerGraphAndStepwiseAllocation) {
 }  // namespace tflite
 
 int main(int argc, char** argv) {
-  ::tflite::LogToStderr();
+  // ::tflite::LogToStderr();
+  FLAGS_logtostderr = true;
+
   ::testing::InitGoogleTest(&argc, argv);
   return RUN_ALL_TESTS();
 }
index 5cac04b38364958c5b0794c21742e8b592372ae9..5bc7dc353b4904bdb182ce029b9b7c654e4a5f33 100644 (file)
@@ -21,7 +21,6 @@ limitations under the License.
 namespace tflite {
 namespace {
 
-using ::int32;
 using ::testing::ElementsAreArray;
 
 class StridedSliceOpModel : public SingleOpModel {
index 6786b1618456637aecfd870b9984af65b59784f6..4d3b553b22788240805a1792de20f3b4d492749b 100644 (file)
@@ -118,7 +118,6 @@ cc_test(
         "//tensorflow/contrib/lite:string_util",
         "//tensorflow/contrib/lite/schema:schema_fbs",
         "//tensorflow/contrib/lite/testing:util",
-        "//tensorflow/core:framework_lite",
         "@com_google_googletest//:gtest",
         "@flatbuffers",
     ],
index 87f6854e9e67c0389949c8d72a476036051d1c0f..244d4f0396bb6733905606c486b0b93457b887a9 100644 (file)
@@ -12,9 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 ==============================================================================*/
-#include <string>
-#include <vector>
-
+#include "tensorflow/contrib/lite/tools/verifier.h"
 #include "flatbuffers/flatbuffers.h"
 #include "flatbuffers/util.h"
 #include <gtest/gtest.h>
@@ -22,9 +20,7 @@ limitations under the License.
 #include "tensorflow/contrib/lite/error_reporter.h"
 #include "tensorflow/contrib/lite/schema/schema_generated.h"
 #include "tensorflow/contrib/lite/testing/util.h"
-#include "tensorflow/contrib/lite/tools/verifier.h"
 #include "tensorflow/contrib/lite/version.h"
-#include "tensorflow/core/framework/numeric_types.h"
 
 namespace tflite {
 
@@ -115,7 +111,7 @@ TEST(VerifyModel, TestSimpleModel) {
 }
 
 TEST(VerifyModel, TestCorruptedData) {
-  std::string model = "123";
+  string model = "123";
   ASSERT_FALSE(Verify(model.data(), model.size(), /*error_reporter=*/nullptr));
 }
 
@@ -135,8 +131,8 @@ TEST(VerifyModel, TestRandomModificationIsNotAllowed) {
                            /*subgraphs=*/0, /*description=*/0, /*buffers=*/0);
   ::tflite::FinishModelBuffer(builder, model);
 
-  std::string model_content(reinterpret_cast<char*>(builder.GetBufferPointer()),
-                            builder.GetSize());
+  string model_content(reinterpret_cast<char*>(builder.GetBufferPointer()),
+                       builder.GetSize());
   for (int i = 0; i < model_content.size(); i++) {
     model_content[i] = (model_content[i] + 137) % 255;
     EXPECT_FALSE(Verify(model_content.data(), model_content.size(),