File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ RUN pip install /tmp/tensorflow_gcs_config/tensorflow*.whl && \
6565 rm -rf /tmp/tensorflow_gcs_config && \
6666 /tmp/clean-layer.sh
6767
68+ # Install TensorFlow addons (TFA).
69+ # TFA functionnality relying on Custom Op won't work. See: https://github.com/tensorflow/addons/issues/987.
70+ RUN pip install tensorflow-addons==0.10.0 && \
71+ /tmp/clean-layer.sh
72+
6873RUN apt-get install -y libfreetype6-dev && \
6974 apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
7075 pip install gensim && \
Original file line number Diff line number Diff line change 1+ import unittest
2+
3+ import tensorflow as tf
4+ import tensorflow_addons as tfa
5+
6+
7+ class TestTensorflowAddons (unittest .TestCase ):
8+ def test_tfa_image (self ):
9+ img_raw = tf .io .read_file ('/input/tests/data/dot.png' )
10+ img = tf .io .decode_image (img_raw )
11+ img = tf .image .convert_image_dtype (img , tf .float32 )
12+ mean = tfa .image .mean_filter2d (img , filter_shape = 1 )
13+
14+ self .assertEqual (1 , len (mean ))
You can’t perform that action at this time.
0 commit comments