File tree 2 files changed +19
-0
lines changed
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 && \
65
65
rm -rf /tmp/tensorflow_gcs_config && \
66
66
/tmp/clean-layer.sh
67
67
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
+
68
73
RUN apt-get install -y libfreetype6-dev && \
69
74
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
70
75
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