From 1f6a06a292438b6d8ce440e0d60d600547ce159c Mon Sep 17 00:00:00 2001 From: Larry Yan Date: Thu, 11 Jul 2019 20:32:01 +0800 Subject: [PATCH] fix(encoder): rm tf inception unittest --- tests/test_image_encoder_tf.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tests/test_image_encoder_tf.py diff --git a/tests/test_image_encoder_tf.py b/tests/test_image_encoder_tf.py deleted file mode 100644 index b3ecefcd..00000000 --- a/tests/test_image_encoder_tf.py +++ /dev/null @@ -1,19 +0,0 @@ -import os -import numpy as np -from gnes.encoder.image.inception import TFInceptionEncoder -import unittest - - -class TestTFImageEncoder(unittest.TestCase): - def setUp(self): - dirname = os.path.dirname(__file__) - self.yaml_path = os.path.join(dirname, 'yaml', 'tf-inception-encoder.yaml') - self.test_data_1 = [np.random.uniform(0, 1, size=(299, 299, 3)).astype(np.uint8) for _ in range(1)] - self.test_data_2 = [np.random.uniform(0, 1, size=(299, 299, 3)).astype(np.uint8) for _ in range(100)] - - def test_encoding(self): - self.encoder = TFInceptionEncoder.load_yaml(self.yaml_path) - ret1 = self.encoder.encode(self.test_data_1) - ret2 = self.encoder.encode(self.test_data_2) - self.assertEqual(ret1.shape[0], 1) - self.assertEqual(ret2.shape[0], 1000)