diff --git a/Dockerfile b/Dockerfile index 2414d25d..0b3ad7cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,10 @@ RUN apt-get install -y libfreetype6-dev && \ pip install xgboost && \ pip install lightgbm && \ pip install git+git://github.com/Lasagne/Lasagne.git && \ + # b/145530394 don't install deps to avoid installing tensorflow-gpu in the cpu image. + # all the other dependencies are already satisfied. Remove --no-deps flags once we handle + # package consolidation for TensorFlow. + pip install --no-deps tensorflow-addons && \ pip install keras && \ pip install keras-rl && \ #keras-rcnn diff --git a/tests/test_tensorflow_addons.py b/tests/test_tensorflow_addons.py new file mode 100644 index 00000000..21730603 --- /dev/null +++ b/tests/test_tensorflow_addons.py @@ -0,0 +1,14 @@ +import unittest + +import tensorflow as tf +import tensorflow_addons as tfa + + +class TestTensorflowAddons(unittest.TestCase): + def test_tfa_image(self): + img_raw = tf.io.read_file('/input/tests/data/dot.png') + img = tf.io.decode_image(img_raw) + img = tf.image.convert_image_dtype(img, tf.float32) + mean = tfa.image.mean_filter2d(img, filter_shape=1) + + self.assertEqual(1, len(mean))