We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
adaptive_avg_pool2d
Close #20804

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/mindspore/ops/function/nn_func.py`
Content:
```
1 """Includes Mindspore Frontend functions listed in the TODO list
2 https://github.com/unifyai/ivy/issues/14951."""
3 
4 # local
5 import ivy
6 from ivy.func_wrapper import with_supported_dtypes
7 from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
8 
9 
10 @with_supported_dtypes(
11     {
12         "2.0.0 and below": (
13             "int8",
14             "int16",
15             "int32",
16             "int64",
17             "float16",
18             "float32",
19             "float64",
20         )
21     },
22     "mindspore",
23 )
24 @to_ivy_arrays_and_back
25 def dropout2d(input, p=0.5, training=True):
26     return ivy.dropout2d(input, p, training=training, data_format="NCHW")
27 
28 
29 @with_supported_dtypes({"2.0.0 and below": ("float16", "float32")}, "mindspore")
30 @to_ivy_arrays_and_back
31 def selu(input_x):
32     return ivy.selu(input_x)
33 
34 
35 @with_supported_dtypes({"2.0 and below": ("float16", "float32")}, "mindspore")
36 @to_ivy_arrays_and_back
37 def softsign(x):
38     return ivy.divide(x, ivy.add(1, ivy.abs(x)))
39 
40 @with_supported_dtypes({"2.0 and below": ("int8", "int16", "int32", "int64", "float16", "float32", "float64")}, "mindspore")
41 @to_ivy_arrays_and_back
42 def pad(input, pad_width, mode='constant', constant_values=0):
43     return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)
```
--- 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/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
--- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py
+++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
@@ -40,4 +40,10 @@
 @with_supported_dtypes({"2.0 and below": ("int8", "int16", "int32", "int64", "float16", "float32", "float64")}, "mindspore")
 @to_ivy_arrays_and_back
 def pad(input, pad_width, mode='constant', constant_values=0):
-    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)
\ No newline at end of file
+    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)
+
+
+@with_supported_dtypes({"2.0.0 and below": ("float16", "float32", "float64")}, "mindspore")
+@to_ivy_arrays_and_back
+def adaptive_avg_pool2d(input, output_size):
+    return ivy.adaptive_avg_pool2d(input, output_size)

{"golden_diff": "diff --git a/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py\n--- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py\n+++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py\n@@ -40,4 +40,10 @@\n @with_supported_dtypes({\"2.0 and below\": (\"int8\", \"int16\", \"int32\", \"int64\", \"float16\", \"float32\", \"float64\")}, \"mindspore\")\n @to_ivy_arrays_and_back\n def pad(input, pad_width, mode='constant', constant_values=0):\n-    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)\n\\ No newline at end of file\n+    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)\n+\n+\n+@with_supported_dtypes({\"2.0.0 and below\": (\"float16\", \"float32\", \"float64\")}, \"mindspore\")\n+@to_ivy_arrays_and_back\n+def adaptive_avg_pool2d(input, output_size):\n+    return ivy.adaptive_avg_pool2d(input, output_size)\n", "issue": "adaptive_avg_pool2d\nClose #20804\n", "before_files": [{"content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_dtypes(\n    {\n        \"2.0.0 and below\": (\n            \"int8\",\n            \"int16\",\n            \"int32\",\n            \"int64\",\n            \"float16\",\n            \"float32\",\n            \"float64\",\n        )\n    },\n    \"mindspore\",\n)\n@to_ivy_arrays_and_back\ndef dropout2d(input, p=0.5, training=True):\n    return ivy.dropout2d(input, p, training=training, data_format=\"NCHW\")\n\n\n@with_supported_dtypes({\"2.0.0 and below\": (\"float16\", \"float32\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef selu(input_x):\n    return ivy.selu(input_x)\n\n\n@with_supported_dtypes({\"2.0 and below\": (\"float16\", \"float32\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef softsign(x):\n    return ivy.divide(x, ivy.add(1, ivy.abs(x)))\n\n@with_supported_dtypes({\"2.0 and below\": (\"int8\", \"int16\", \"int32\", \"int64\", \"float16\", \"float32\", \"float64\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef pad(input, pad_width, mode='constant', constant_values=0):\n    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)", "path": "ivy/functional/frontends/mindspore/ops/function/nn_func.py"}], "after_files": [{"content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_dtypes(\n    {\n        \"2.0.0 and below\": (\n            \"int8\",\n            \"int16\",\n            \"int32\",\n            \"int64\",\n            \"float16\",\n            \"float32\",\n            \"float64\",\n        )\n    },\n    \"mindspore\",\n)\n@to_ivy_arrays_and_back\ndef dropout2d(input, p=0.5, training=True):\n    return ivy.dropout2d(input, p, training=training, data_format=\"NCHW\")\n\n\n@with_supported_dtypes({\"2.0.0 and below\": (\"float16\", \"float32\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef selu(input_x):\n    return ivy.selu(input_x)\n\n\n@with_supported_dtypes({\"2.0 and below\": (\"float16\", \"float32\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef softsign(x):\n    return ivy.divide(x, ivy.add(1, ivy.abs(x)))\n\n@with_supported_dtypes({\"2.0 and below\": (\"int8\", \"int16\", \"int32\", \"int64\", \"float16\", \"float32\", \"float64\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef pad(input, pad_width, mode='constant', constant_values=0):\n    return ivy.pad(input, pad_width, mode=mode, constant_values=constant_values)\n\n\n@with_supported_dtypes({\"2.0.0 and below\": (\"float16\", \"float32\", \"float64\")}, \"mindspore\")\n@to_ivy_arrays_and_back\ndef adaptive_avg_pool2d(input, output_size):\n    return ivy.adaptive_avg_pool2d(input, output_size)\n", "path": "ivy/functional/frontends/mindspore/ops/function/nn_func.py"}]}