internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ivy-llc/ivy

Issue:
celu



Discussion:
- [ ] #16180

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -109,3 +109,17 @@ def log_softmax(x, axis=-1, dtype=None, name=None):
 @to_ivy_arrays_and_back
 def prelu(x, weight, data_format="NCHW", name=None):
     return ivy.add(ivy.maximum(0, x), ivy.multiply(weight, ivy.minimum(0, x)))
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def celu(
+    x,
+    /,
+    *,
+    alpha=1.0,
+    name=None,
+):
+    prod = alpha * (ivy.exp(x / alpha) - 1)
+    ret = ivy.maximum(0, x) + ivy.minimum(0, prod)
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -325,3 +325,32 @@ def test_paddle_prelu(
         x=x[0],
         weight=x[1],
     )
+
+
+# celu
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.celu",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    alpha=helpers.ints(min_value=1, max_value=10),
+)
+def test_paddle_celu(
+    *,
+    dtype_and_x,
+    alpha,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        alpha=alpha,
+    )
Repository: ivy-llc/ivy

Issue:
hardshrink



Discussion:
- [ ] #16185

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -31,3 +31,10 @@ def selu(
 
 tanh = paddle_tanh
 log_softmax = paddle_log_softmax
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def hardshrink(x, threshold=0.5, name=None):
+    mask = ivy.logical_or(ivy.greater(x, threshold), ivy.less(x, -threshold))
+    return ivy.where(mask, x, 0.0)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -37,3 +37,32 @@ def test_paddle_selu(
         alpha=alpha,
         scale=scale,
     )
+
+
+# hardshrink
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.hardshrink",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    threshold=helpers.floats(min_value=0, max_value=1, exclude_min=True),
+)
+def test_paddle_hardshrink(
+    *,
+    dtype_and_x,
+    threshold,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        threshold=threshold,
+    )
Repository: ivy-llc/ivy

Issue:
hardtanh



Discussion:
- [ ] #16189

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -38,3 +38,18 @@ def selu(
 def hardshrink(x, threshold=0.5, name=None):
     mask = ivy.logical_or(ivy.greater(x, threshold), ivy.less(x, -threshold))
     return ivy.where(mask, x, 0.0)
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def hardtanh(
+    x,
+    /,
+    *,
+    min=-1.0,
+    max=1.0,
+    name=None,
+):
+    less = ivy.where(ivy.less(x, min), min, x)
+    ret = ivy.where(ivy.greater(x, max), max, less).astype(x.dtype)
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -66,3 +66,34 @@ def test_paddle_hardshrink(
         x=x[0],
         threshold=threshold,
     )
+
+
+# hardtanh
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.hardtanh",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    max_val=helpers.floats(min_value=0, max_value=1, exclude_min=True),
+)
+def test_paddle_hardtanh(
+    *,
+    dtype_and_x,
+    max_val,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    max_min = max_val, -max_val
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        min=max_min[1],
+        max=max_min[0],
+    )
Repository: ivy-llc/ivy

Issue:
argmax



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -114,3 +114,6 @@ def log(self, name=None):
     def sin(self, name=None):
         return ivy.sin(self._ivy_array)
 
+    @with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
+    def argmax(self, axis=None, keepdim=False, dtype=None, name=None):
+        return ivy.argmax(self._ivy_array, axis=axis, keepdims=keepdim, dtype=dtype)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
@@ -408,3 +408,45 @@ def test_paddle_log(
         frontend=frontend,
         on_device=on_device,
     )
+
+
+# argmax
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="argmax",
+    dtype_x_axis=helpers.dtype_values_axis(
+        available_dtypes=st.one_of(helpers.get_dtypes("float")),
+        min_axis=-1,
+        max_axis=0,
+        min_num_dims=1,
+        force_int_axis=True,
+    ),
+    keep_dims=st.booleans(),
+)
+def test_paddle_argmax(
+    dtype_x_axis,
+    keep_dims,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+):
+    input_dtypes, x, axis = dtype_x_axis
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtypes,
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=input_dtypes,
+        method_all_as_kwargs_np={
+            "axis": axis,
+            "keepdim": keep_dims,
+        },
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+    )
Repository: ivy-llc/ivy

Issue:
hardsigmoid



Discussion:
- [ ] #16197

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -59,3 +59,10 @@ def hardtanh(
 @to_ivy_arrays_and_back
 def gelu(x, approximate=False, name=None):
     return ivy.gelu(x, approximate=approximate)
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def hardsigmoid(x, slope=0.1666667, offset=0.5, name=None):
+    ret = ivy.minimum(ivy.maximum(ivy.add(ivy.multiply(x, slope), offset), 0), 1)
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -131,3 +131,35 @@ def test_paddle_gelu(
         x=x[0],
         approximate=approximate,
     )
+
+
+# hardsigmoid
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.hardsigmoid",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    slope=helpers.ints(min_value=0, max_value=10),
+    offset=helpers.ints(min_value=0, max_value=10),
+)
+def test_paddle_hardsigmoid(
+    *,
+    dtype_and_x,
+    slope,
+    offset,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        slope=slope,
+        offset=offset,
+    )
Repository: ivy-llc/ivy

Issue:
cosh



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -110,6 +110,10 @@ def asinh(self, name=None):
     def asin(self, name=None):
         return ivy.asin(self._ivy_array)
 
+    @with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
+    def cosh(self, name=None):
+        return ivy.cosh(self._ivy_array)
+
     @with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
     def log(self, name=None):
         return ivy.log(self._ivy_array)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
@@ -414,6 +414,39 @@ def test_paddle_asinh(
     )
 
 
+# cosh
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="cosh",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+)
+def test_paddle_cosh(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
+
 # log
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
dirichlet



Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/experimental/random.py b/ivy/functional/backends/paddle/experimental/random.py
--- a/ivy/functional/backends/paddle/experimental/random.py
+++ b/ivy/functional/backends/paddle/experimental/random.py
@@ -1,6 +1,9 @@
 # global
 from typing import Optional, Union, Sequence
 import paddle
+
+from ivy import with_unsupported_device_and_dtypes
+from ivy.functional.backends.paddle import backend_version
 from ivy.utils.exceptions import IvyNotImplementedException
 
 # local
@@ -10,6 +13,22 @@
 # dirichlet
 
 
+@with_unsupported_device_and_dtypes(
+    {
+        "2.4.2 and below": {
+            "cpu": (
+                "int8",
+                "int16",
+                "uint8",
+                "float16",
+                "complex64",
+                "complex128",
+                "bool",
+            )
+        }
+    },
+    backend_version,
+)
 def dirichlet(
     alpha: Union[paddle.Tensor, float, Sequence[float]],
     /,
@@ -19,7 +38,15 @@ def dirichlet(
     seed: Optional[int] = None,
     dtype: Optional[paddle.dtype] = None,
 ) -> paddle.Tensor:
-    raise IvyNotImplementedException()
+    size = size if size is not None else len(alpha)
+    dtype = dtype if dtype is not None else paddle.float64
+    if seed is not None:
+        paddle.seed(seed)
+    res = paddle.to_tensor(
+        paddle.distribution.Dirichlet(concentration=alpha).sample(shape=size),
+        dtype=dtype,
+    )
+    return res
 
 
 def beta(
diff --git a/ivy/functional/backends/paddle/experimental/statistical.py b/ivy/functional/backends/paddle/experimental/statistical.py
--- a/ivy/functional/backends/paddle/experimental/statistical.py
+++ b/ivy/functional/backends/paddle/experimental/statistical.py
@@ -1,11 +1,11 @@
 # global
 from typing import Optional, Union, Tuple, Sequence
 import paddle
-from ivy.utils.exceptions import IvyNotImplementedException
 import ivy.functional.backends.paddle as paddle_backend
 
 # local
 from ivy.func_wrapper import with_unsupported_device_and_dtypes
+from ivy.utils.exceptions import IvyNotImplementedException
 from . import backend_version
 
 


Test patch:
Repository: ivy-llc/ivy

Issue:
truncatediv



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/tensorflow/general_functions.py b/ivy/functional/frontends/tensorflow/general_functions.py
--- a/ivy/functional/frontends/tensorflow/general_functions.py
+++ b/ivy/functional/frontends/tensorflow/general_functions.py
@@ -549,3 +549,9 @@ def while_loop(
     name=None,
 ):
     return ivy.while_loop(test_fn=cond, body_fn=body, vars=loop_vars)
+
+
+@with_unsupported_dtypes({"2.12.0 and below": ("float16", "bfloat16")}, "tensorflow")
+@to_ivy_arrays_and_back
+def truncatediv(x, y, name=None):
+    return x.trunc_divide(y)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
@@ -2024,3 +2024,35 @@ def _test_body_fn(x):
         body=_test_body_fn,
         loop_vars=(x[0],),
     )
+
+
+# truncatediv
+@handle_frontend_test(
+    fn_tree="tensorflow.truncatediv",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        min_value=-20,
+        max_value=20,
+        shared_dtype=True,
+    ),
+    test_with_out=st.just(False),
+)
+def test_tensorflow_truncatediv(
+    *,
+    dtype_and_x,
+    test_flags,
+    frontend,
+    fn_tree,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        y=x[1],
+    )
Repository: ivy-llc/ivy

Issue:
relu6



Discussion:
- [ ] #16240

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -66,3 +66,9 @@ def gelu(x, approximate=False, name=None):
 def hardsigmoid(x, slope=0.1666667, offset=0.5, name=None):
     ret = ivy.minimum(ivy.maximum(ivy.add(ivy.multiply(x, slope), offset), 0), 1)
     return ret
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def relu6(x, name=None):
+    return ivy.relu6(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -163,3 +163,29 @@ def test_paddle_hardsigmoid(
         slope=slope,
         offset=offset,
     )
+
+
+# relu6
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.relu6",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_relu6(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )
Repository: ivy-llc/ivy

Issue:
softshrink



Discussion:
- [ ] #16243

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -72,3 +72,18 @@ def hardsigmoid(x, slope=0.1666667, offset=0.5, name=None):
 @to_ivy_arrays_and_back
 def relu6(x, name=None):
     return ivy.relu6(x)
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def softshrink(
+    x,
+    /,
+    *,
+    threshold=0.5,
+    name=None,
+):
+    low = ivy.where(ivy.less(x, -threshold), ivy.add(x, threshold), 0)
+    up = ivy.where(ivy.greater(x, threshold), ivy.subtract(x, threshold), 0)
+    add = ivy.add(low, up)
+    return ivy.astype(add, x.dtype)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -189,3 +189,32 @@ def test_paddle_relu6(
         on_device=on_device,
         x=x[0],
     )
+
+
+# softshrink
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.softshrink",
+    dtype_and_input=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    threshold=helpers.floats(min_value=0, max_value=1, exclude_min=True),
+)
+def test_paddle_softshrink(
+    *,
+    dtype_and_input,
+    threshold,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_input
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        threshold=threshold,
+    )
Repository: ivy-llc/ivy

Issue:
softsign



Discussion:
- [ ] #16245

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -87,3 +87,14 @@ def softshrink(
     up = ivy.where(ivy.greater(x, threshold), ivy.subtract(x, threshold), 0)
     add = ivy.add(low, up)
     return ivy.astype(add, x.dtype)
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def softsign(
+    x,
+    /,
+    *,
+    name=None,
+):
+    return ivy.divide(x, ivy.add(1, ivy.abs(x)))


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_activation.py
@@ -218,3 +218,31 @@ def test_paddle_softshrink(
         x=x[0],
         threshold=threshold,
     )
+
+
+# softsign
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.softsign",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        safety_factor_scale="log",
+        small_abs_safety_factor=20,
+    ),
+)
+def test_paddle_softsign(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )