Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ RUN pip install /tmp/tensorflow_gcs_config/tensorflow*.whl && \
rm -rf /tmp/tensorflow_gcs_config && \
/tmp/clean-layer.sh

# Install TensorFlow addons (TFA).
# TFA functionnality relying on Custom Op won't work. See: https://github.com/tensorflow/addons/issues/987.
RUN pip install tensorflow-addons==0.10.0 && \
/tmp/clean-layer.sh

RUN apt-get install -y libfreetype6-dev && \
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
pip install gensim && \
Expand Down
14 changes: 14 additions & 0 deletions tests/test_tensorflow_addons.py
Original file line number Diff line number Diff line change
@@ -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))