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

Issue:
tril_indices
Working on (#15024 -> )


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -133,6 +133,14 @@ def meshgrid(*args, **kwargs):
     return ivy.meshgrid(*args, indexing="ij")
 
 
+@with_supported_dtypes({"2.5.0 and below": ("int32", "int64")}, "paddle")
+@to_ivy_arrays_and_back
+def tril_indices(row, col, offset=0, dtype="int64"):
+    arr = ivy.tril_indices(row, col, offset)
+    arr = ivy.astype(arr, dtype)
+    return arr
+
+
 @with_supported_dtypes(
     {"2.5.0 and below": ("float32", "float64", "int32", "int64")}, "paddle"
 )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
@@ -522,6 +522,41 @@ def test_paddle_meshgrid(
     )
 
 
+# tril_indices
+@handle_frontend_test(
+    fn_tree="paddle.tril_indices",
+    dtype=helpers.get_dtypes("valid", full=False),
+    row=st.integers(min_value=1, max_value=5),
+    col=st.integers(min_value=1, max_value=5),
+    offset=st.integers(min_value=-4, max_value=4),
+    test_with_out=st.just(False),
+)
+def test_paddle_tril_indices(
+    row,
+    col,
+    offset,
+    dtype,
+    test_flags,
+    backend_fw,
+    frontend,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=False,
+        row=row,
+        col=col,
+        offset=offset,
+        dtype=dtype[0],
+    )
+
+
 # diag
 @handle_frontend_test(
     fn_tree="paddle.diag",
Repository: ivy-llc/ivy

Issue:
log_loss



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/loss.py b/ivy/functional/frontends/paddle/nn/functional/loss.py
--- a/ivy/functional/frontends/paddle/nn/functional/loss.py
+++ b/ivy/functional/frontends/paddle/nn/functional/loss.py
@@ -101,3 +101,15 @@ def cosine_embedding_loss(
         out = ivy.sum(out)
 
     return out
+
+
+@with_supported_dtypes(
+    {"2.5.0 and below": ("float32",)},
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def log_loss(input, label, epsilon=0.0001, name=None):
+    out = -label * ivy.log(input + epsilon) - (
+        (1 - label) * ivy.log(1 - input + epsilon)
+    )
+    return out


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_loss.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_loss.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_loss.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_paddle_loss.py
@@ -155,3 +155,44 @@ def test_paddle_cosine_embedding_loss(
         margin=margin,
         reduction=reduction,
     )
+
+
+# log_loss
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.log_loss",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        num_arrays=2,
+        min_value=0,
+        max_value=1,
+        exclude_min=True,
+        exclude_max=True,
+        shared_dtype=True,
+        min_num_dims=2,
+        max_num_dims=2,
+        max_dim_size=1,
+    ),
+    epsilon=st.floats(
+        min_value=1e-7,
+        max_value=1.0,
+    ),
+)
+def test_paddle_log_loss(
+    dtype_and_x,
+    epsilon,
+    fn_tree,
+    test_flags,
+    frontend,
+    on_device,
+):
+    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,
+        input=x[0],
+        label=x[1],
+        epsilon=epsilon,
+    )
Repository: ivy-llc/ivy

Issue:
outer



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -325,6 +325,12 @@ def sgn(x, name=None):
     return ivy.sign(x, np_variant=True)
 
 
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def outer(x, y, name=None):
+    return ivy.outer(x, y)
+
+
 # maximum
 @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
 @to_ivy_arrays_and_back


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
@@ -1502,3 +1502,34 @@ def test_paddle_lerp(
         y=x[1],
         weight=x[2],
     )
+
+
+# outer
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.outer",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        num_arrays=2,
+        min_num_dims=1,
+        max_num_dims=1,
+        shared_dtype=True,
+    ),
+)
+def test_paddle_outer(
+    *,
+    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,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        on_device=on_device,
+        x=x[0],
+        y=x[1],
+    )
Repository: ivy-llc/ivy

Issue:
diag
Working on (#15024 -> #18061)


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -133,6 +133,21 @@ def meshgrid(*args, **kwargs):
     return ivy.meshgrid(*args, indexing="ij")
 
 
+@with_supported_dtypes(
+    {"2.5.0 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+def diag(x, offset=0, padding_value=0, name=None):
+    if len(x.shape) == 1:
+        padding_value = ivy.astype(padding_value, ivy.dtype(x))
+        ret = ivy.diagflat(x, offset=offset, padding_value=padding_value)
+        if len(ret.shape) != 2:
+            ret = ivy.reshape(ret, (1, 1))
+    else:
+        ret = ivy.diag(x, k=offset)
+    return ret
+
+
 @with_supported_dtypes(
     {"2.5.0 and below": ("float32", "float64", "int32", "int64")}, "paddle"
 )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
@@ -522,6 +522,46 @@ def test_paddle_meshgrid(
     )
 
 
+# diag
+@handle_frontend_test(
+    fn_tree="paddle.diag",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_num_dims=1,
+        max_num_dims=2,
+        min_dim_size=1,
+        max_dim_size=5,
+    ),
+    k=helpers.ints(min_value=-1, max_value=1),
+    p=st.one_of(
+        helpers.ints(min_value=-25, max_value=25),
+        helpers.floats(min_value=-25, max_value=25),
+    ),
+)
+def test_paddle_diag(
+    dtype_and_x,
+    k,
+    p,
+    backend_fw,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        offset=k,
+        padding_value=p,
+    )
+
+
 # logspace
 @handle_frontend_test(
     fn_tree="paddle.logspace",
Repository: ivy-llc/ivy

Issue:
diagonal



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/math.py b/ivy/functional/frontends/paddle/math.py
--- a/ivy/functional/frontends/paddle/math.py
+++ b/ivy/functional/frontends/paddle/math.py
@@ -175,6 +175,25 @@ def deg2rad(x, name=None):
     return ivy.deg2rad(x)
 
 
+@with_supported_dtypes(
+    {
+        "2.5.1 and below": (
+            "int32",
+            "int64",
+            "float64",
+            "complex128",
+            "float32",
+            "complex64",
+            "bool",
+        )
+    },
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def diagonal(x, offset=0, axis1=0, axis2=1, name=None):
+    return ivy.diagonal(x, offset=offset, axis1=axis1, axis2=axis2)
+
+
 @with_supported_dtypes(
     {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
 )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
@@ -14,6 +14,33 @@
 # --------------- #
 
 
+@st.composite
+def _draw_paddle_diagonal(draw):
+    _dtype, _x = draw(
+        helpers.dtype_and_values(
+            available_dtypes=helpers.get_dtypes("numeric"),
+            min_num_dims=2,
+            max_num_dims=10,
+            min_dim_size=1,
+            max_dim_size=50,
+        )
+    )
+
+    offset = (draw(helpers.ints(min_value=-10, max_value=50)),)
+    axes = (
+        draw(
+            st.lists(
+                helpers.ints(min_value=-(len(_x)), max_value=len(_x)),
+                min_size=len(_x) + 1,
+                max_size=len(_x) + 1,
+                unique=True,
+            ).filter(lambda axes: axes[0] % 2 != axes[1] % 2)
+        ),
+    )
+
+    return _dtype, _x[0], offset[0], axes[0]
+
+
 @st.composite
 def _test_paddle_take_helper(draw):
     mode = draw(st.sampled_from(["raise", "clip", "wrap"]))
@@ -680,6 +707,32 @@ def test_paddle_deg2rad(
     )
 
 
+# diagonal
+@handle_frontend_test(fn_tree="paddle.diagonal", data=_draw_paddle_diagonal())
+def test_paddle_diagonal(
+    *,
+    data,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    _dtype, _x, offset, axes = data
+    helpers.test_frontend_function(
+        input_dtypes=_dtype,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=_x,
+        offset=offset,
+        axis1=axes[0],
+        axis2=axes[1],
+    )
+
+
 # diff
 @handle_frontend_test(
     fn_tree="paddle.diff",
Repository: ivy-llc/ivy

Issue:
triangular



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/random/functions.py b/ivy/functional/frontends/numpy/random/functions.py
--- a/ivy/functional/frontends/numpy/random/functions.py
+++ b/ivy/functional/frontends/numpy/random/functions.py
@@ -197,3 +197,19 @@ def logistic(loc=0.0, scale=1.0, size=None):
     u = ivy.random_uniform(low=0.0, high=0.0, shape=size, dtype="float64")
     x = loc + scale * ivy.log(u / (1 - u))
     return x
+
+
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar
+def triangular(left, mode, right, size=None):
+    if left > mode or mode > right or left == right:
+        raise ivy.utils.exceptions.IvyValueError(
+            "left < mode < right is not being followed"
+        )
+    u = ivy.random_uniform(low=0.0, high=1.0, shape=size, dtype="float64")
+    condition = u <= (mode - left) / (right - left)
+    values1 = left + (right - left) * (u * (mode - left) / (right - left)) ** 0.5
+    values2 = (
+        right - (right - mode) * ((1 - u) * (right - mode) / (right - left)) ** 0.5
+    )
+    return ivy.where(condition, values1, values2)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
@@ -832,3 +832,58 @@ def test_numpy_logistic(
         scale=scale,
         size=size,
     )
+
+
+@handle_frontend_test(
+    fn_tree="numpy.random.triangular",
+    input_dtypes=helpers.get_dtypes("float"),
+    left=st.floats(
+        allow_nan=False,
+        allow_infinity=False,
+        width=32,
+        min_value=0,
+        max_value=10,
+    ),
+    mode=st.floats(
+        allow_nan=False,
+        allow_infinity=False,
+        width=32,
+        min_value=10,
+        max_value=100,
+        exclude_min=True,
+    ),
+    right=st.floats(
+        allow_nan=False,
+        allow_infinity=False,
+        width=32,
+        min_value=100,
+        max_value=1000,
+        exclude_min=True,
+    ),
+    size=helpers.get_shape(allow_none=True),
+)
+def test_numpy_triangular(
+    input_dtypes,
+    size,
+    frontend,
+    test_flags,
+    backend_fw,
+    fn_tree,
+    on_device,
+    left,
+    mode,
+    right,
+):
+    helpers.test_frontend_function(
+        input_dtypes=input_dtypes,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=False,
+        left=left,
+        mode=mode,
+        right=right,
+        size=size,
+    )
Repository: ivy-llc/ivy

Issue:
dropout3d



Discussion:
- [ ] #18182

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/common.py b/ivy/functional/frontends/paddle/nn/functional/common.py
--- a/ivy/functional/frontends/paddle/nn/functional/common.py
+++ b/ivy/functional/frontends/paddle/nn/functional/common.py
@@ -109,3 +109,9 @@ def interpolate(
 def linear(x, weight, bias=None, name=None):
     weight = ivy.swapaxes(weight, -1, -2)
     return ivy.linear(x, weight, bias=bias)
+
+
+@to_ivy_arrays_and_back
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+def dropout3d(x, p=0.5, training=True, data_format="NCDHW", name=None):
+    return ivy.dropout3d(x, p, training=training, data_format=data_format)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_common.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_common.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_common.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_common.py
@@ -416,3 +416,42 @@ def test_linear(
         weight=weight,
         bias=bias,
     )
+
+
+# Dropout3d
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.common.dropout3d",
+    d_type_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_num_dims=5,
+        max_num_dims=5,
+    ),
+    p=st.floats(min_value=0.0, max_value=1.0),
+    training=st.booleans(),
+    data_format=st.sampled_from(["NCDHW", "NDHWC"]),
+)
+def test_paddle_dropout3d(
+    *,
+    d_type_and_x,
+    p,
+    training,
+    data_format,
+    on_device,
+    backend_fw,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    dtype, x = d_type_and_x
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        p=p,
+        training=training,
+        data_format=data_format,
+    )
Repository: ivy-llc/ivy

Issue:
smooth_l1_loss



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/loss.py b/ivy/functional/frontends/paddle/nn/functional/loss.py
--- a/ivy/functional/frontends/paddle/nn/functional/loss.py
+++ b/ivy/functional/frontends/paddle/nn/functional/loss.py
@@ -138,3 +138,29 @@ def log_loss(input, label, epsilon=0.0001, name=None):
         (1 - label) * ivy.log(1 - input + epsilon)
     )
     return out
+
+
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def smooth_l1_loss(
+    input,
+    label,
+    reduction="mean",
+    delta=1.0,
+    name=None,
+):
+    sum_diff = ivy.abs(input - label).astype(label.dtype)
+    condition = sum_diff <= delta
+    out = ivy.where(
+        condition,
+        0.5 * ivy.pow(ivy.abs(input - label), 2).astype(label.dtype),
+        (delta * ivy.abs(ivy.abs(input - label))).astype(label.dtype)
+        - (0.5 * ivy.pow(delta, 2)).astype(label.dtype),
+    )
+    if reduction == "none":
+        pass
+    elif reduction == "mean":
+        out = ivy.mean(out)
+    elif reduction == "sum":
+        out = ivy.sum(out)
+    return out.astype(label.dtype)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
@@ -233,3 +233,38 @@ def test_paddle_log_loss(
         label=x[1],
         epsilon=epsilon,
     )
+
+
+# smooth_l1_loss
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.smooth_l1_loss",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        num_arrays=2,
+        shared_dtype=True,
+        min_num_dims=2,
+        max_num_dims=5,
+        min_dim_size=1,
+        max_dim_size=10,
+    ),
+    delta=st.floats(
+        min_value=0.1,
+        max_value=1.0,
+    ),
+    reduction=st.sampled_from(["mean", "sum", "none"]),
+)
+def test_paddle_smooth_l1_loss(
+    dtype_and_x, delta, reduction, 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,
+        input=x[0],
+        label=x[1],
+        reduction=reduction,
+        delta=delta,
+    )
Repository: ivy-llc/ivy

Issue:
bincount



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -170,3 +170,9 @@ def dot(x, y, name=None):
 @to_ivy_arrays_and_back
 def transpose(x, perm, name=None):
     return ivy.permute_dims(x, axes=perm)
+
+
+@with_supported_dtypes({"2.4.1 and above": ("int64",)}, "paddle")
+@to_ivy_arrays_and_back
+def bincount(x, weights=None, minlength=0, name=None):
+    return ivy.bincount(x, weights=weights, minlength=minlength)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_linalg.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_linalg.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_linalg.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_linalg.py
@@ -730,3 +730,41 @@ def test_paddle_transpose(
         x=x[0],
         perm=perm,
     )
+
+
+# bincount
+@handle_frontend_test(
+    fn_tree="paddle.bincount",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("integer"),
+        min_value=1,
+        max_value=2,
+        shape=st.shared(
+            helpers.get_shape(
+                min_num_dims=1,
+                max_num_dims=1,
+            ),
+            key="a_s_d",
+        ),
+    ),
+    test_with_out=st.just(False),
+)
+def test_paddle_bincount(
+    *,
+    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],
+        weights=None,
+        minlength=0,
+    )
Repository: ivy-llc/ivy

Issue:
Fix reduction_ops.test_torch_mean
|   |   |
|---|---|
|paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a>
|numpy|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a>
|jax|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a>
|tensorflow|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a>
|torch|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a>



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/reduction_ops.py b/ivy/functional/frontends/torch/reduction_ops.py
--- a/ivy/functional/frontends/torch/reduction_ops.py
+++ b/ivy/functional/frontends/torch/reduction_ops.py
@@ -65,9 +65,11 @@ def sum(input, dim=None, keepdim=False, *, dtype=None, out=None):
 
 @numpy_to_torch_style_args
 @to_ivy_arrays_and_back
-def mean(input, dim=None, axis=None, keepdim=False, *, out=None):
-    if dim is None:
-        dim = axis
+def mean(input, dim=None, keepdim=False, *, dtype=None, out=None):
+    if dtype is not None:
+        input = input.astype(dtype)
+        if out is not None:
+            out = out.astype(dtype)
     return ivy.mean(input, axis=dim, keepdims=keepdim, out=out)
 
 


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
@@ -291,11 +291,13 @@ def test_torch_sum(
         max_value=1e04,
     ),
     keepdims=st.booleans(),
+    dtypes=helpers.get_dtypes("float_and_complex", none=True, full=False),
 )
 def test_torch_mean(
     *,
     dtype_and_x,
     keepdims,
+    dtypes,
     on_device,
     fn_tree,
     frontend,
@@ -311,6 +313,8 @@ def test_torch_mean(
         input=x[0],
         dim=axis,
         keepdim=keepdims,
+        dtype=dtypes[0],
+        atol=1e-2,
     )