def testImageAugmentation(self):
   x = np.random.rand(500, 500, 3)
   with self.test_session() as session:
     y = common_layers.image_augmentation(tf.constant(x))
     res = session.run(y)
   self.assertEqual(res.shape, (299, 299, 3))
 def testImageAugmentation(self):
     x = np.random.rand(500, 500, 3)
     with self.test_session() as session:
         y = common_layers.image_augmentation(tf.constant(x))
         res = session.run(y)
     self.assertEqual(res.shape, (299, 299, 3))
Esempio n. 3
0
 def preprocess(img):
   img = tf.image.resize_images(img, [360, 360])
   img = common_layers.image_augmentation(tf.to_float(img) / 255.)
   return tf.to_int64(img * 255.)