We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
poincare_test.py is not run by bazel
**Describe the bug**

This time it's just that it's not declared in the BUILD.

**Code to reproduce the issue**

Provide a reproducible test case that is the bare minimum necessary to generate the problem.

```
bazel test //tensorflow_addons/layers:poincare_test.py
```

```
INFO: Writing tracer profile to '/home/gdemarmi/.cache/bazel/_bazel_gdemarmi/c0c8233ef0c2491af30539fc61a9ec68/command.profile.gz'
ERROR: Skipping '//tensorflow_addons/layers:poincare_test.py': no such target '//tensorflow_addons/layers:poincare_test.py': target 'poincare_test.py' not declared in package 'tensorflow_addons/layers'; however, a source file of this name exists.  (Perhaps add 'exports_files(["poincare_test.py"])' to tensorflow_addons/layers/BUILD?) defined by /mnt/c/Users/gdemarmi/Desktop/projects/addons/tensorflow_addons/layers/BUILD
ERROR: no such target '//tensorflow_addons/layers:poincare_test.py': target 'poincare_test.py' not declared in package 'tensorflow_addons/layers'; however, a source file of this name exists.  (Perhaps add 'exports_files(["poincare_test.py"])' to tensorflow_addons/layers/BUILD?) defined by /mnt/c/Users/gdemarmi/Desktop/projects/addons/tensorflow_addons/layers/BUILD
INFO: Elapsed time: 0.372s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
```

**Other info / logs**

When actually running the tests in the file, we get this error:

```
(proof_of_concept_pytest) /mnt/c/Users/gdemarmi/Desktop/projects/addons $ pytest -v tensorflow_addons/layers/poincare_test.py
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
================================================================================== test session starts ==================================================================================
platform linux -- Python 3.7.5, pytest-5.0.1, py-1.8.0, pluggy-0.13.0 -- /home/gdemarmi/softwares/python/anaconda/bin/python
cachedir: .pytest_cache
rootdir: /mnt/c/Users/gdemarmi/Desktop/projects/addons
plugins: arraydiff-0.3, cov-2.7.1, doctestplus-0.2.0, flake8-1.0.4, forked-1.0.2, openfiles-0.4.0, pep8-1.0.6, remotedata-0.3.2, xdist-1.27.0, typeguard-2.7.1
collected 3 items

tensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalize PASSED                                                                                    [ 33%]
tensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalizeDimArray FAILED                                                                            [ 66%]
tensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::test_session SKIPPED                                                                                            [100%]

======================================================================================= FAILURES ========================================================================================
__________________________________________________________________ PoincareNormalizeTest.testPoincareNormalizeDimArray __________________________________________________________________

self = <tensorflow_addons.layers.poincare_test.PoincareNormalizeTest testMethod=testPoincareNormalizeDimArray>, args = (), kwargs = {}

    def decorated(self, *args, **kwargs):
      try:
        with context.graph_mode():
          with self.test_session(use_gpu=use_gpu, config=config):
>           f(self, *args, **kwargs)

/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/test_util.py:1111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tensorflow_addons/layers/poincare_test.py:71: in testPoincareNormalizeDimArray
    expected_output=outputs_expected,
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/test_util.py:1666: in decorated
    result = f(self, *args, **kwargs)
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/keras/testing_utils.py:126: in layer_test
    layer = layer_cls(**kwargs)
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:809: in wrapper
    check_argument_types(memo)
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:670: in check_argument_types
    raise exc from None
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:668: in check_argument_types
    check_type(description, value, expected_type, memo)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

argname = 'argument "axis"', value = [1, 2], expected_type = <class 'int'>, memo = <typeguard._CallMemo object at 0x7f59a4229440>

    def check_type(argname: str, value, expected_type, memo: Optional[_CallMemo] = None) -> None:
        """
        Ensure that ``value`` matches ``expected_type``.

        The types from the :mod:`typing` module do not support :func:`isinstance` or :func:`issubclass`
        so a number of type specific checks are required. This function knows which checker to call
        for which type.

        :param argname: name of the argument to check; used for error messages
        :param value: value to be checked against ``expected_type``
        :param expected_type: a class or generic type instance

        """
        if expected_type is Any:
            return

        if expected_type is None:
            # Only happens on < 3.6
            expected_type = type(None)

        origin_type = getattr(expected_type, '__origin__', None)
        if origin_type is not None:
            checker_func = origin_type_checkers.get(origin_type)
            if checker_func:
                checker_func(argname, value, expected_type, memo)
            else:
                check_type(argname, value, origin_type, memo)
        elif isclass(expected_type):
            if issubclass(expected_type, Tuple):
                check_tuple(argname, value, expected_type, memo)
            elif issubclass(expected_type, Callable) and hasattr(expected_type, '__args__'):
                # Needed on Python 3.5.0 to 3.5.2
                check_callable(argname, value, expected_type, memo)
            elif issubclass(expected_type, (float, complex)):
                check_number(argname, value, expected_type)
            elif _subclass_check_unions and issubclass(expected_type, Union):
                check_union(argname, value, expected_type, memo)
            elif isinstance(expected_type, TypeVar):
                check_typevar(argname, value, expected_type, memo)
            elif issubclass(expected_type, IO):
                check_io(argname, value, expected_type)
            elif issubclass(expected_type, dict) and hasattr(expected_type, '__annotations__'):
                check_typed_dict(argname, value, expected_type, memo)
            elif getattr(expected_type, '_is_protocol', False):
                check_protocol(argname, value, expected_type)
            else:
                expected_type = (getattr(expected_type, '__extra__', None) or origin_type or
                                 expected_type)

                if expected_type is bytes:
                    # As per https://github.com/python/typing/issues/552
                    expected_type = (bytearray, bytes)

                if not isinstance(value, expected_type):
                    raise TypeError(
                        'type of {} must be {}; got {} instead'.
>                       format(argname, qualified_name(expected_type), qualified_name(value)))
E                   TypeError: type of argument "axis" must be int; got list instead

/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:598: TypeError
=================================================================================== warnings summary ====================================================================================
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/google/protobuf/descriptor.py:47
  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/google/protobuf/descriptor.py:47: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from google.protobuf.pyext import _message

/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1
  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    from collections import Mapping, MutableMapping

tensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalize
  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/indexed_slices.py:348: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
    if not isinstance(values, collections.Sequence):

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================================== 1 failed, 1 passed, 1 skipped, 4 warnings in 18.87 seconds ===============================================================
```

 @rahulunair could you take a look? Thanks! :)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tensorflow_addons/layers/poincare.py`
Content:
```
1 # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # ==============================================================================
15 """Implementing PoincareNormalize layer."""
16 
17 import tensorflow as tf
18 from typeguard import typechecked
19 
20 
21 @tf.keras.utils.register_keras_serializable(package="Addons")
22 class PoincareNormalize(tf.keras.layers.Layer):
23     """Project into the Poincare ball with norm <= 1.0 - epsilon.
24 
25     https://en.wikipedia.org/wiki/Poincare_ball_model
26 
27     Used in Poincare Embeddings for Learning Hierarchical Representations
28     Maximilian Nickel, Douwe Kiela https://arxiv.org/pdf/1705.08039.pdf
29 
30     For a 1-D tensor with `axis = 0`, computes
31 
32                   (x * (1 - epsilon)) / ||x||     if ||x|| > 1 - epsilon
33         output =
34                    x                              otherwise
35 
36     For `x` with more dimensions, independently normalizes each 1-D slice along
37     dimension `axis`.
38 
39     Arguments:
40       axis: Axis along which to normalize.  A scalar or a vector of integers.
41       epsilon: A small deviation from the edge of the unit sphere for
42         numerical stability.
43     """
44 
45     @typechecked
46     def __init__(self, axis: int = 1, epsilon: float = 1e-5, **kwargs):
47         super().__init__(**kwargs)
48         self.axis = axis
49         self.epsilon = epsilon
50 
51     def call(self, inputs):
52         x = tf.convert_to_tensor(inputs)
53         square_sum = tf.math.reduce_sum(tf.math.square(x), self.axis, keepdims=True)
54         x_inv_norm = tf.math.rsqrt(square_sum)
55         x_inv_norm = tf.math.minimum((1.0 - self.epsilon) * x_inv_norm, 1.0)
56         outputs = tf.math.multiply(x, x_inv_norm)
57         return outputs
58 
59     def compute_output_shape(self, input_shape):
60         return input_shape
61 
62     def get_config(self):
63         config = {"axis": self.axis, "epsilon": self.epsilon}
64         base_config = super().get_config()
65         return {**base_config, **config}
66
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/tensorflow_addons/layers/poincare.py b/tensorflow_addons/layers/poincare.py
--- a/tensorflow_addons/layers/poincare.py
+++ b/tensorflow_addons/layers/poincare.py
@@ -16,6 +16,7 @@
 
 import tensorflow as tf
 from typeguard import typechecked
+from typing import Union, List
 
 
 @tf.keras.utils.register_keras_serializable(package="Addons")
@@ -43,7 +44,9 @@
     """
 
     @typechecked
-    def __init__(self, axis: int = 1, epsilon: float = 1e-5, **kwargs):
+    def __init__(
+        self, axis: Union[None, int, List[int]] = 1, epsilon: float = 1e-5, **kwargs
+    ):
         super().__init__(**kwargs)
         self.axis = axis
         self.epsilon = epsilon

{"golden_diff": "diff --git a/tensorflow_addons/layers/poincare.py b/tensorflow_addons/layers/poincare.py\n--- a/tensorflow_addons/layers/poincare.py\n+++ b/tensorflow_addons/layers/poincare.py\n@@ -16,6 +16,7 @@\n \n import tensorflow as tf\n from typeguard import typechecked\n+from typing import Union, List\n \n \n @tf.keras.utils.register_keras_serializable(package=\"Addons\")\n@@ -43,7 +44,9 @@\n     \"\"\"\n \n     @typechecked\n-    def __init__(self, axis: int = 1, epsilon: float = 1e-5, **kwargs):\n+    def __init__(\n+        self, axis: Union[None, int, List[int]] = 1, epsilon: float = 1e-5, **kwargs\n+    ):\n         super().__init__(**kwargs)\n         self.axis = axis\n         self.epsilon = epsilon\n", "issue": "poincare_test.py is not run by bazel\n**Describe the bug**\r\n\r\nThis time it's just that it's not declared in the BUILD.\r\n\r\n**Code to reproduce the issue**\r\n\r\nProvide a reproducible test case that is the bare minimum necessary to generate the problem.\r\n\r\n```\r\nbazel test //tensorflow_addons/layers:poincare_test.py\r\n```\r\n\r\n```\r\nINFO: Writing tracer profile to '/home/gdemarmi/.cache/bazel/_bazel_gdemarmi/c0c8233ef0c2491af30539fc61a9ec68/command.profile.gz'\r\nERROR: Skipping '//tensorflow_addons/layers:poincare_test.py': no such target '//tensorflow_addons/layers:poincare_test.py': target 'poincare_test.py' not declared in package 'tensorflow_addons/layers'; however, a source file of this name exists.  (Perhaps add 'exports_files([\"poincare_test.py\"])' to tensorflow_addons/layers/BUILD?) defined by /mnt/c/Users/gdemarmi/Desktop/projects/addons/tensorflow_addons/layers/BUILD\r\nERROR: no such target '//tensorflow_addons/layers:poincare_test.py': target 'poincare_test.py' not declared in package 'tensorflow_addons/layers'; however, a source file of this name exists.  (Perhaps add 'exports_files([\"poincare_test.py\"])' to tensorflow_addons/layers/BUILD?) defined by /mnt/c/Users/gdemarmi/Desktop/projects/addons/tensorflow_addons/layers/BUILD\r\nINFO: Elapsed time: 0.372s\r\nINFO: 0 processes.\r\nFAILED: Build did NOT complete successfully (0 packages loaded)\r\nFAILED: Build did NOT complete successfully (0 packages loaded)\r\n```\r\n\r\n**Other info / logs**\r\n\r\nWhen actually running the tests in the file, we get this error:\r\n\r\n```\r\n(proof_of_concept_pytest) /mnt/c/Users/gdemarmi/Desktop/projects/addons $ pytest -v tensorflow_addons/layers/poincare_test.py\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1\r\n  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')\r\n================================================================================== test session starts ==================================================================================\r\nplatform linux -- Python 3.7.5, pytest-5.0.1, py-1.8.0, pluggy-0.13.0 -- /home/gdemarmi/softwares/python/anaconda/bin/python\r\ncachedir: .pytest_cache\r\nrootdir: /mnt/c/Users/gdemarmi/Desktop/projects/addons\r\nplugins: arraydiff-0.3, cov-2.7.1, doctestplus-0.2.0, flake8-1.0.4, forked-1.0.2, openfiles-0.4.0, pep8-1.0.6, remotedata-0.3.2, xdist-1.27.0, typeguard-2.7.1\r\ncollected 3 items\r\n\r\ntensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalize PASSED                                                                                    [ 33%]\r\ntensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalizeDimArray FAILED                                                                            [ 66%]\r\ntensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::test_session SKIPPED                                                                                            [100%]\r\n\r\n======================================================================================= FAILURES ========================================================================================\r\n__________________________________________________________________ PoincareNormalizeTest.testPoincareNormalizeDimArray __________________________________________________________________\r\n\r\nself = <tensorflow_addons.layers.poincare_test.PoincareNormalizeTest testMethod=testPoincareNormalizeDimArray>, args = (), kwargs = {}\r\n\r\n    def decorated(self, *args, **kwargs):\r\n      try:\r\n        with context.graph_mode():\r\n          with self.test_session(use_gpu=use_gpu, config=config):\r\n>           f(self, *args, **kwargs)\r\n\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/test_util.py:1111:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ntensorflow_addons/layers/poincare_test.py:71: in testPoincareNormalizeDimArray\r\n    expected_output=outputs_expected,\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/test_util.py:1666: in decorated\r\n    result = f(self, *args, **kwargs)\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/keras/testing_utils.py:126: in layer_test\r\n    layer = layer_cls(**kwargs)\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:809: in wrapper\r\n    check_argument_types(memo)\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:670: in check_argument_types\r\n    raise exc from None\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:668: in check_argument_types\r\n    check_type(description, value, expected_type, memo)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nargname = 'argument \"axis\"', value = [1, 2], expected_type = <class 'int'>, memo = <typeguard._CallMemo object at 0x7f59a4229440>\r\n\r\n    def check_type(argname: str, value, expected_type, memo: Optional[_CallMemo] = None) -> None:\r\n        \"\"\"\r\n        Ensure that ``value`` matches ``expected_type``.\r\n\r\n        The types from the :mod:`typing` module do not support :func:`isinstance` or :func:`issubclass`\r\n        so a number of type specific checks are required. This function knows which checker to call\r\n        for which type.\r\n\r\n        :param argname: name of the argument to check; used for error messages\r\n        :param value: value to be checked against ``expected_type``\r\n        :param expected_type: a class or generic type instance\r\n\r\n        \"\"\"\r\n        if expected_type is Any:\r\n            return\r\n\r\n        if expected_type is None:\r\n            # Only happens on < 3.6\r\n            expected_type = type(None)\r\n\r\n        origin_type = getattr(expected_type, '__origin__', None)\r\n        if origin_type is not None:\r\n            checker_func = origin_type_checkers.get(origin_type)\r\n            if checker_func:\r\n                checker_func(argname, value, expected_type, memo)\r\n            else:\r\n                check_type(argname, value, origin_type, memo)\r\n        elif isclass(expected_type):\r\n            if issubclass(expected_type, Tuple):\r\n                check_tuple(argname, value, expected_type, memo)\r\n            elif issubclass(expected_type, Callable) and hasattr(expected_type, '__args__'):\r\n                # Needed on Python 3.5.0 to 3.5.2\r\n                check_callable(argname, value, expected_type, memo)\r\n            elif issubclass(expected_type, (float, complex)):\r\n                check_number(argname, value, expected_type)\r\n            elif _subclass_check_unions and issubclass(expected_type, Union):\r\n                check_union(argname, value, expected_type, memo)\r\n            elif isinstance(expected_type, TypeVar):\r\n                check_typevar(argname, value, expected_type, memo)\r\n            elif issubclass(expected_type, IO):\r\n                check_io(argname, value, expected_type)\r\n            elif issubclass(expected_type, dict) and hasattr(expected_type, '__annotations__'):\r\n                check_typed_dict(argname, value, expected_type, memo)\r\n            elif getattr(expected_type, '_is_protocol', False):\r\n                check_protocol(argname, value, expected_type)\r\n            else:\r\n                expected_type = (getattr(expected_type, '__extra__', None) or origin_type or\r\n                                 expected_type)\r\n\r\n                if expected_type is bytes:\r\n                    # As per https://github.com/python/typing/issues/552\r\n                    expected_type = (bytearray, bytes)\r\n\r\n                if not isinstance(value, expected_type):\r\n                    raise TypeError(\r\n                        'type of {} must be {}; got {} instead'.\r\n>                       format(argname, qualified_name(expected_type), qualified_name(value)))\r\nE                   TypeError: type of argument \"axis\" must be int; got list instead\r\n\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/typeguard/__init__.py:598: TypeError\r\n=================================================================================== warnings summary ====================================================================================\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/google/protobuf/descriptor.py:47\r\n  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/google/protobuf/descriptor.py:47: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working\r\n    from google.protobuf.pyext import _message\r\n\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1\r\n/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1\r\n  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working\r\n    from collections import Mapping, MutableMapping\r\n\r\ntensorflow_addons/layers/poincare_test.py::PoincareNormalizeTest::testPoincareNormalize\r\n  /home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/tensorflow_core/python/framework/indexed_slices.py:348: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working\r\n    if not isinstance(values, collections.Sequence):\r\n\r\n-- Docs: https://docs.pytest.org/en/latest/warnings.html\r\n============================================================== 1 failed, 1 passed, 1 skipped, 4 warnings in 18.87 seconds ===============================================================\r\n```\r\n\r\n @rahulunair could you take a look? Thanks! :)\n", "before_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Implementing PoincareNormalize layer.\"\"\"\n\nimport tensorflow as tf\nfrom typeguard import typechecked\n\n\n@tf.keras.utils.register_keras_serializable(package=\"Addons\")\nclass PoincareNormalize(tf.keras.layers.Layer):\n    \"\"\"Project into the Poincare ball with norm <= 1.0 - epsilon.\n\n    https://en.wikipedia.org/wiki/Poincare_ball_model\n\n    Used in Poincare Embeddings for Learning Hierarchical Representations\n    Maximilian Nickel, Douwe Kiela https://arxiv.org/pdf/1705.08039.pdf\n\n    For a 1-D tensor with `axis = 0`, computes\n\n                  (x * (1 - epsilon)) / ||x||     if ||x|| > 1 - epsilon\n        output =\n                   x                              otherwise\n\n    For `x` with more dimensions, independently normalizes each 1-D slice along\n    dimension `axis`.\n\n    Arguments:\n      axis: Axis along which to normalize.  A scalar or a vector of integers.\n      epsilon: A small deviation from the edge of the unit sphere for\n        numerical stability.\n    \"\"\"\n\n    @typechecked\n    def __init__(self, axis: int = 1, epsilon: float = 1e-5, **kwargs):\n        super().__init__(**kwargs)\n        self.axis = axis\n        self.epsilon = epsilon\n\n    def call(self, inputs):\n        x = tf.convert_to_tensor(inputs)\n        square_sum = tf.math.reduce_sum(tf.math.square(x), self.axis, keepdims=True)\n        x_inv_norm = tf.math.rsqrt(square_sum)\n        x_inv_norm = tf.math.minimum((1.0 - self.epsilon) * x_inv_norm, 1.0)\n        outputs = tf.math.multiply(x, x_inv_norm)\n        return outputs\n\n    def compute_output_shape(self, input_shape):\n        return input_shape\n\n    def get_config(self):\n        config = {\"axis\": self.axis, \"epsilon\": self.epsilon}\n        base_config = super().get_config()\n        return {**base_config, **config}\n", "path": "tensorflow_addons/layers/poincare.py"}], "after_files": [{"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Implementing PoincareNormalize layer.\"\"\"\n\nimport tensorflow as tf\nfrom typeguard import typechecked\nfrom typing import Union, List\n\n\n@tf.keras.utils.register_keras_serializable(package=\"Addons\")\nclass PoincareNormalize(tf.keras.layers.Layer):\n    \"\"\"Project into the Poincare ball with norm <= 1.0 - epsilon.\n\n    https://en.wikipedia.org/wiki/Poincare_ball_model\n\n    Used in Poincare Embeddings for Learning Hierarchical Representations\n    Maximilian Nickel, Douwe Kiela https://arxiv.org/pdf/1705.08039.pdf\n\n    For a 1-D tensor with `axis = 0`, computes\n\n                  (x * (1 - epsilon)) / ||x||     if ||x|| > 1 - epsilon\n        output =\n                   x                              otherwise\n\n    For `x` with more dimensions, independently normalizes each 1-D slice along\n    dimension `axis`.\n\n    Arguments:\n      axis: Axis along which to normalize.  A scalar or a vector of integers.\n      epsilon: A small deviation from the edge of the unit sphere for\n        numerical stability.\n    \"\"\"\n\n    @typechecked\n    def __init__(\n        self, axis: Union[None, int, List[int]] = 1, epsilon: float = 1e-5, **kwargs\n    ):\n        super().__init__(**kwargs)\n        self.axis = axis\n        self.epsilon = epsilon\n\n    def call(self, inputs):\n        x = tf.convert_to_tensor(inputs)\n        square_sum = tf.math.reduce_sum(tf.math.square(x), self.axis, keepdims=True)\n        x_inv_norm = tf.math.rsqrt(square_sum)\n        x_inv_norm = tf.math.minimum((1.0 - self.epsilon) * x_inv_norm, 1.0)\n        outputs = tf.math.multiply(x, x_inv_norm)\n        return outputs\n\n    def compute_output_shape(self, input_shape):\n        return input_shape\n\n    def get_config(self):\n        config = {\"axis\": self.axis, \"epsilon\": self.epsilon}\n        base_config = super().get_config()\n        return {**base_config, **config}\n", "path": "tensorflow_addons/layers/poincare.py"}]}