We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Documentation of ERGAS
## 📚 Documentation

It seems to me that the documentation of ERGAS are not consistent with the code. In the documentation the ratio h/l is multiplied with the rest, in the code it is a divisor. I think the confusion originates from the paper that is marked as the source. In the paper the ratio h/l < 1. The way the documentation states it, h/l should be > 1. Page 161 seems to give some insights on that.
The bug regarding these incosistencies was fixed in april, but now the documentation is not so clear and not consistent with the literature. 

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: `src/torchmetrics/image/ergas.py`
Content:
```
1 # Copyright The Lightning team.
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 from typing import Any, List, Optional, Sequence, Union
16 
17 from torch import Tensor
18 from typing_extensions import Literal
19 
20 from torchmetrics.functional.image.ergas import _ergas_compute, _ergas_update
21 from torchmetrics.metric import Metric
22 from torchmetrics.utilities import rank_zero_warn
23 from torchmetrics.utilities.data import dim_zero_cat
24 from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
25 from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
26 
27 if not _MATPLOTLIB_AVAILABLE:
28     __doctest_skip__ = ["ErrorRelativeGlobalDimensionlessSynthesis.plot"]
29 
30 
31 class ErrorRelativeGlobalDimensionlessSynthesis(Metric):
32     r"""Calculate the `Error relative global dimensionless synthesis`_  (ERGAS) metric.
33 
34     This metric is used to calculate the accuracy of Pan sharpened image considering normalized average error of each
35     band of the result image. It is defined as:
36 
37     .. math::
38         ERGAS = 100 \cdot \frac{h}{l} \cdot \sqrt{\frac{1}{N} \sum_{k=1}^{N} \frac{RMSE(B_k)^2}{\mu_k^2}}
39 
40     where :math:`h` and :math:`l` denote the spatial resolution (pixel size) of the high and low resolution images,
41     often shorted to the ratio between them :math:`r=h/l`. :math:`N` is the number of spectral bands, :math:`RMSE(B_k)`
42     is the root mean square error of the k-th band between low and high resolution images, and :math:`\\mu_k` is the
43     mean value of the k-th band of the reference image.
44 
45     As input to ``forward`` and ``update`` the metric accepts the following input
46 
47     - ``preds`` (:class:`~torch.Tensor`): Predictions from model
48     - ``target`` (:class:`~torch.Tensor`): Ground truth values
49 
50     As output of `forward` and `compute` the metric returns the following output
51 
52     - ``ergas`` (:class:`~torch.Tensor`): if ``reduction!='none'`` returns float scalar tensor with average ERGAS
53       value over sample else returns tensor of shape ``(N,)`` with ERGAS values per sample
54 
55     Args:
56         ratio: ratio of high resolution to low resolution.
57         reduction: a method to reduce metric score over labels.
58 
59             - ``'elementwise_mean'``: takes the mean (default)
60             - ``'sum'``: takes the sum
61             - ``'none'`` or ``None``: no reduction will be applied
62 
63         kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
64 
65     Example:
66         >>> import torch
67         >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis
68         >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))
69         >>> target = preds * 0.75
70         >>> ergas = ErrorRelativeGlobalDimensionlessSynthesis()
71         >>> torch.round(ergas(preds, target))
72         tensor(10.)
73 
74     """
75 
76     higher_is_better: bool = False
77     is_differentiable: bool = True
78     full_state_update: bool = False
79     plot_lower_bound: float = 0.0
80 
81     preds: List[Tensor]
82     target: List[Tensor]
83 
84     def __init__(
85         self,
86         ratio: float = 4,
87         reduction: Literal["elementwise_mean", "sum", "none", None] = "elementwise_mean",
88         **kwargs: Any,
89     ) -> None:
90         super().__init__(**kwargs)
91         rank_zero_warn(
92             "Metric `UniversalImageQualityIndex` will save all targets and"
93             " predictions in buffer. For large datasets this may lead"
94             " to large memory footprint."
95         )
96 
97         self.add_state("preds", default=[], dist_reduce_fx="cat")
98         self.add_state("target", default=[], dist_reduce_fx="cat")
99         self.ratio = ratio
100         self.reduction = reduction
101 
102     def update(self, preds: Tensor, target: Tensor) -> None:
103         """Update state with predictions and targets."""
104         preds, target = _ergas_update(preds, target)
105         self.preds.append(preds)
106         self.target.append(target)
107 
108     def compute(self) -> Tensor:
109         """Compute explained variance over state."""
110         preds = dim_zero_cat(self.preds)
111         target = dim_zero_cat(self.target)
112         return _ergas_compute(preds, target, self.ratio, self.reduction)
113 
114     def plot(
115         self, val: Optional[Union[Tensor, Sequence[Tensor]]] = None, ax: Optional[_AX_TYPE] = None
116     ) -> _PLOT_OUT_TYPE:
117         """Plot a single or multiple values from the metric.
118 
119         Args:
120             val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results.
121                 If no value is provided, will automatically call `metric.compute` and plot that result.
122             ax: An matplotlib axis object. If provided will add plot to that axis
123 
124         Returns:
125             Figure and Axes object
126 
127         Raises:
128             ModuleNotFoundError:
129                 If `matplotlib` is not installed
130 
131         .. plot::
132             :scale: 75
133 
134             >>> # Example plotting a single value
135             >>> import torch
136             >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis
137             >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))
138             >>> target = preds * 0.75
139             >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()
140             >>> metric.update(preds, target)
141             >>> fig_, ax_ = metric.plot()
142 
143         .. plot::
144             :scale: 75
145 
146             >>> # Example plotting multiple values
147             >>> import torch
148             >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis
149             >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))
150             >>> target = preds * 0.75
151             >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()
152             >>> values = [ ]
153             >>> for _ in range(10):
154             ...     values.append(metric(preds, target))
155             >>> fig_, ax_ = metric.plot(values)
156 
157         """
158         return self._plot(val, ax)
159
```
--- 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/src/torchmetrics/image/ergas.py b/src/torchmetrics/image/ergas.py
--- a/src/torchmetrics/image/ergas.py
+++ b/src/torchmetrics/image/ergas.py
@@ -35,12 +35,11 @@
     band of the result image. It is defined as:
 
     .. math::
-        ERGAS = 100 \cdot \frac{h}{l} \cdot \sqrt{\frac{1}{N} \sum_{k=1}^{N} \frac{RMSE(B_k)^2}{\mu_k^2}}
+        ERGAS = \frac{100}{r} \cdot \sqrt{\frac{1}{N} \sum_{k=1}^{N} \frac{RMSE(B_k)^2}{\mu_k^2}}
 
-    where :math:`h` and :math:`l` denote the spatial resolution (pixel size) of the high and low resolution images,
-    often shorted to the ratio between them :math:`r=h/l`. :math:`N` is the number of spectral bands, :math:`RMSE(B_k)`
-    is the root mean square error of the k-th band between low and high resolution images, and :math:`\\mu_k` is the
-    mean value of the k-th band of the reference image.
+    where :math:`r=h/l` denote the ratio in spatial resolution (pixel size) between the high and low resolution images.
+    :math:`N` is the number of spectral bands, :math:`RMSE(B_k)` is the root mean square error of the k-th band between
+    low and high resolution images, and :math:`\\mu_k` is the mean value of the k-th band of the reference image.
 
     As input to ``forward`` and ``update`` the metric accepts the following input

{"golden_diff": "diff --git a/src/torchmetrics/image/ergas.py b/src/torchmetrics/image/ergas.py\n--- a/src/torchmetrics/image/ergas.py\n+++ b/src/torchmetrics/image/ergas.py\n@@ -35,12 +35,11 @@\n     band of the result image. It is defined as:\n \n     .. math::\n-        ERGAS = 100 \\cdot \\frac{h}{l} \\cdot \\sqrt{\\frac{1}{N} \\sum_{k=1}^{N} \\frac{RMSE(B_k)^2}{\\mu_k^2}}\n+        ERGAS = \\frac{100}{r} \\cdot \\sqrt{\\frac{1}{N} \\sum_{k=1}^{N} \\frac{RMSE(B_k)^2}{\\mu_k^2}}\n \n-    where :math:`h` and :math:`l` denote the spatial resolution (pixel size) of the high and low resolution images,\n-    often shorted to the ratio between them :math:`r=h/l`. :math:`N` is the number of spectral bands, :math:`RMSE(B_k)`\n-    is the root mean square error of the k-th band between low and high resolution images, and :math:`\\\\mu_k` is the\n-    mean value of the k-th band of the reference image.\n+    where :math:`r=h/l` denote the ratio in spatial resolution (pixel size) between the high and low resolution images.\n+    :math:`N` is the number of spectral bands, :math:`RMSE(B_k)` is the root mean square error of the k-th band between\n+    low and high resolution images, and :math:`\\\\mu_k` is the mean value of the k-th band of the reference image.\n \n     As input to ``forward`` and ``update`` the metric accepts the following input\n", "issue": "Documentation of ERGAS\n## \ud83d\udcda Documentation\r\n\r\nIt seems to me that the documentation of ERGAS are not consistent with the code. In the documentation the ratio h/l is multiplied with the rest, in the code it is a divisor. I think the confusion originates from the paper that is marked as the source. In the paper the ratio h/l < 1. The way the documentation states it, h/l should be > 1. Page 161 seems to give some insights on that.\r\nThe bug regarding these incosistencies was fixed in april, but now the documentation is not so clear and not consistent with the literature. \r\n\r\nThanks!\r\n\n", "before_files": [{"content": "# Copyright The Lightning team.\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\nfrom typing import Any, List, Optional, Sequence, Union\n\nfrom torch import Tensor\nfrom typing_extensions import Literal\n\nfrom torchmetrics.functional.image.ergas import _ergas_compute, _ergas_update\nfrom torchmetrics.metric import Metric\nfrom torchmetrics.utilities import rank_zero_warn\nfrom torchmetrics.utilities.data import dim_zero_cat\nfrom torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE\nfrom torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE\n\nif not _MATPLOTLIB_AVAILABLE:\n    __doctest_skip__ = [\"ErrorRelativeGlobalDimensionlessSynthesis.plot\"]\n\n\nclass ErrorRelativeGlobalDimensionlessSynthesis(Metric):\n    r\"\"\"Calculate the `Error relative global dimensionless synthesis`_  (ERGAS) metric.\n\n    This metric is used to calculate the accuracy of Pan sharpened image considering normalized average error of each\n    band of the result image. It is defined as:\n\n    .. math::\n        ERGAS = 100 \\cdot \\frac{h}{l} \\cdot \\sqrt{\\frac{1}{N} \\sum_{k=1}^{N} \\frac{RMSE(B_k)^2}{\\mu_k^2}}\n\n    where :math:`h` and :math:`l` denote the spatial resolution (pixel size) of the high and low resolution images,\n    often shorted to the ratio between them :math:`r=h/l`. :math:`N` is the number of spectral bands, :math:`RMSE(B_k)`\n    is the root mean square error of the k-th band between low and high resolution images, and :math:`\\\\mu_k` is the\n    mean value of the k-th band of the reference image.\n\n    As input to ``forward`` and ``update`` the metric accepts the following input\n\n    - ``preds`` (:class:`~torch.Tensor`): Predictions from model\n    - ``target`` (:class:`~torch.Tensor`): Ground truth values\n\n    As output of `forward` and `compute` the metric returns the following output\n\n    - ``ergas`` (:class:`~torch.Tensor`): if ``reduction!='none'`` returns float scalar tensor with average ERGAS\n      value over sample else returns tensor of shape ``(N,)`` with ERGAS values per sample\n\n    Args:\n        ratio: ratio of high resolution to low resolution.\n        reduction: a method to reduce metric score over labels.\n\n            - ``'elementwise_mean'``: takes the mean (default)\n            - ``'sum'``: takes the sum\n            - ``'none'`` or ``None``: no reduction will be applied\n\n        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.\n\n    Example:\n        >>> import torch\n        >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n        >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n        >>> target = preds * 0.75\n        >>> ergas = ErrorRelativeGlobalDimensionlessSynthesis()\n        >>> torch.round(ergas(preds, target))\n        tensor(10.)\n\n    \"\"\"\n\n    higher_is_better: bool = False\n    is_differentiable: bool = True\n    full_state_update: bool = False\n    plot_lower_bound: float = 0.0\n\n    preds: List[Tensor]\n    target: List[Tensor]\n\n    def __init__(\n        self,\n        ratio: float = 4,\n        reduction: Literal[\"elementwise_mean\", \"sum\", \"none\", None] = \"elementwise_mean\",\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(**kwargs)\n        rank_zero_warn(\n            \"Metric `UniversalImageQualityIndex` will save all targets and\"\n            \" predictions in buffer. For large datasets this may lead\"\n            \" to large memory footprint.\"\n        )\n\n        self.add_state(\"preds\", default=[], dist_reduce_fx=\"cat\")\n        self.add_state(\"target\", default=[], dist_reduce_fx=\"cat\")\n        self.ratio = ratio\n        self.reduction = reduction\n\n    def update(self, preds: Tensor, target: Tensor) -> None:\n        \"\"\"Update state with predictions and targets.\"\"\"\n        preds, target = _ergas_update(preds, target)\n        self.preds.append(preds)\n        self.target.append(target)\n\n    def compute(self) -> Tensor:\n        \"\"\"Compute explained variance over state.\"\"\"\n        preds = dim_zero_cat(self.preds)\n        target = dim_zero_cat(self.target)\n        return _ergas_compute(preds, target, self.ratio, self.reduction)\n\n    def plot(\n        self, val: Optional[Union[Tensor, Sequence[Tensor]]] = None, ax: Optional[_AX_TYPE] = None\n    ) -> _PLOT_OUT_TYPE:\n        \"\"\"Plot a single or multiple values from the metric.\n\n        Args:\n            val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results.\n                If no value is provided, will automatically call `metric.compute` and plot that result.\n            ax: An matplotlib axis object. If provided will add plot to that axis\n\n        Returns:\n            Figure and Axes object\n\n        Raises:\n            ModuleNotFoundError:\n                If `matplotlib` is not installed\n\n        .. plot::\n            :scale: 75\n\n            >>> # Example plotting a single value\n            >>> import torch\n            >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n            >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n            >>> target = preds * 0.75\n            >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()\n            >>> metric.update(preds, target)\n            >>> fig_, ax_ = metric.plot()\n\n        .. plot::\n            :scale: 75\n\n            >>> # Example plotting multiple values\n            >>> import torch\n            >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n            >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n            >>> target = preds * 0.75\n            >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()\n            >>> values = [ ]\n            >>> for _ in range(10):\n            ...     values.append(metric(preds, target))\n            >>> fig_, ax_ = metric.plot(values)\n\n        \"\"\"\n        return self._plot(val, ax)\n", "path": "src/torchmetrics/image/ergas.py"}], "after_files": [{"content": "# Copyright The Lightning team.\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\nfrom typing import Any, List, Optional, Sequence, Union\n\nfrom torch import Tensor\nfrom typing_extensions import Literal\n\nfrom torchmetrics.functional.image.ergas import _ergas_compute, _ergas_update\nfrom torchmetrics.metric import Metric\nfrom torchmetrics.utilities import rank_zero_warn\nfrom torchmetrics.utilities.data import dim_zero_cat\nfrom torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE\nfrom torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE\n\nif not _MATPLOTLIB_AVAILABLE:\n    __doctest_skip__ = [\"ErrorRelativeGlobalDimensionlessSynthesis.plot\"]\n\n\nclass ErrorRelativeGlobalDimensionlessSynthesis(Metric):\n    r\"\"\"Calculate the `Error relative global dimensionless synthesis`_  (ERGAS) metric.\n\n    This metric is used to calculate the accuracy of Pan sharpened image considering normalized average error of each\n    band of the result image. It is defined as:\n\n    .. math::\n        ERGAS = \\frac{100}{r} \\cdot \\sqrt{\\frac{1}{N} \\sum_{k=1}^{N} \\frac{RMSE(B_k)^2}{\\mu_k^2}}\n\n    where :math:`r=h/l` denote the ratio in spatial resolution (pixel size) between the high and low resolution images.\n    :math:`N` is the number of spectral bands, :math:`RMSE(B_k)` is the root mean square error of the k-th band between\n    low and high resolution images, and :math:`\\\\mu_k` is the mean value of the k-th band of the reference image.\n\n    As input to ``forward`` and ``update`` the metric accepts the following input\n\n    - ``preds`` (:class:`~torch.Tensor`): Predictions from model\n    - ``target`` (:class:`~torch.Tensor`): Ground truth values\n\n    As output of `forward` and `compute` the metric returns the following output\n\n    - ``ergas`` (:class:`~torch.Tensor`): if ``reduction!='none'`` returns float scalar tensor with average ERGAS\n      value over sample else returns tensor of shape ``(N,)`` with ERGAS values per sample\n\n    Args:\n        ratio: ratio of high resolution to low resolution.\n        reduction: a method to reduce metric score over labels.\n\n            - ``'elementwise_mean'``: takes the mean (default)\n            - ``'sum'``: takes the sum\n            - ``'none'`` or ``None``: no reduction will be applied\n\n        kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.\n\n    Example:\n        >>> import torch\n        >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n        >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n        >>> target = preds * 0.75\n        >>> ergas = ErrorRelativeGlobalDimensionlessSynthesis()\n        >>> torch.round(ergas(preds, target))\n        tensor(10.)\n\n    \"\"\"\n\n    higher_is_better: bool = False\n    is_differentiable: bool = True\n    full_state_update: bool = False\n    plot_lower_bound: float = 0.0\n\n    preds: List[Tensor]\n    target: List[Tensor]\n\n    def __init__(\n        self,\n        ratio: float = 4,\n        reduction: Literal[\"elementwise_mean\", \"sum\", \"none\", None] = \"elementwise_mean\",\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(**kwargs)\n        rank_zero_warn(\n            \"Metric `UniversalImageQualityIndex` will save all targets and\"\n            \" predictions in buffer. For large datasets this may lead\"\n            \" to large memory footprint.\"\n        )\n\n        self.add_state(\"preds\", default=[], dist_reduce_fx=\"cat\")\n        self.add_state(\"target\", default=[], dist_reduce_fx=\"cat\")\n        self.ratio = ratio\n        self.reduction = reduction\n\n    def update(self, preds: Tensor, target: Tensor) -> None:\n        \"\"\"Update state with predictions and targets.\"\"\"\n        preds, target = _ergas_update(preds, target)\n        self.preds.append(preds)\n        self.target.append(target)\n\n    def compute(self) -> Tensor:\n        \"\"\"Compute explained variance over state.\"\"\"\n        preds = dim_zero_cat(self.preds)\n        target = dim_zero_cat(self.target)\n        return _ergas_compute(preds, target, self.ratio, self.reduction)\n\n    def plot(\n        self, val: Optional[Union[Tensor, Sequence[Tensor]]] = None, ax: Optional[_AX_TYPE] = None\n    ) -> _PLOT_OUT_TYPE:\n        \"\"\"Plot a single or multiple values from the metric.\n\n        Args:\n            val: Either a single result from calling `metric.forward` or `metric.compute` or a list of these results.\n                If no value is provided, will automatically call `metric.compute` and plot that result.\n            ax: An matplotlib axis object. If provided will add plot to that axis\n\n        Returns:\n            Figure and Axes object\n\n        Raises:\n            ModuleNotFoundError:\n                If `matplotlib` is not installed\n\n        .. plot::\n            :scale: 75\n\n            >>> # Example plotting a single value\n            >>> import torch\n            >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n            >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n            >>> target = preds * 0.75\n            >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()\n            >>> metric.update(preds, target)\n            >>> fig_, ax_ = metric.plot()\n\n        .. plot::\n            :scale: 75\n\n            >>> # Example plotting multiple values\n            >>> import torch\n            >>> from torchmetrics.image import ErrorRelativeGlobalDimensionlessSynthesis\n            >>> preds = torch.rand([16, 1, 16, 16], generator=torch.manual_seed(42))\n            >>> target = preds * 0.75\n            >>> metric = ErrorRelativeGlobalDimensionlessSynthesis()\n            >>> values = [ ]\n            >>> for _ in range(10):\n            ...     values.append(metric(preds, target))\n            >>> fig_, ax_ = metric.plot(values)\n\n        \"\"\"\n        return self._plot(val, ax)\n", "path": "src/torchmetrics/image/ergas.py"}]}