We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Training classification accuracy >1
**Describe the bug**
Hi, I am training a classification model on MRI brain scans using vgg16 in gandlf. We expect to have accuracy in the range of 0-1. But Training classification accuracy is displayed >1. Validation accuracy seems correct. Attaching the screenshot below. Can you please have a look?

**Screenshots**
![Screenshot from 2022-03-17 14-13-02](https://user-images.githubusercontent.com/6376680/158874773-97c9a7cd-49a1-45fa-85c9-86b93533911b.png)

**GaNDLF Version**
0.0.14



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `GANDLF/metrics/regression.py`
Content:
```
1 """
2 All the metrics are to be called from here
3 """
4 import torch
5 from sklearn.metrics import balanced_accuracy_score
6 import numpy as np
7 
8 
9 def classification_accuracy(output, label, params):
10     if params["problem_type"] == "classification":
11         predicted_classes = torch.argmax(output, 1)
12     else:
13         predicted_classes = output
14     acc = torch.sum(predicted_classes == label) / len(label)
15     return acc
16 
17 
18 def balanced_acc_score(output, label, params):
19     if params["problem_type"] == "classification":
20         predicted_classes = torch.argmax(output, 1)
21     else:
22         predicted_classes = output
23 
24     return torch.from_numpy(
25         np.array(balanced_accuracy_score(predicted_classes.cpu(), label.cpu()))
26     )
27
```
--- 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/GANDLF/metrics/regression.py b/GANDLF/metrics/regression.py
--- a/GANDLF/metrics/regression.py
+++ b/GANDLF/metrics/regression.py
@@ -11,7 +11,8 @@
         predicted_classes = torch.argmax(output, 1)
     else:
         predicted_classes = output
-    acc = torch.sum(predicted_classes == label) / len(label)
+
+    acc = torch.sum(predicted_classes == label.squeeze()) / len(label)
     return acc

{"golden_diff": "diff --git a/GANDLF/metrics/regression.py b/GANDLF/metrics/regression.py\n--- a/GANDLF/metrics/regression.py\n+++ b/GANDLF/metrics/regression.py\n@@ -11,7 +11,8 @@\n         predicted_classes = torch.argmax(output, 1)\n     else:\n         predicted_classes = output\n-    acc = torch.sum(predicted_classes == label) / len(label)\n+\n+    acc = torch.sum(predicted_classes == label.squeeze()) / len(label)\n     return acc\n", "issue": "Training classification accuracy >1\n**Describe the bug**\r\nHi, I am training a classification model on MRI brain scans using vgg16 in gandlf. We expect to have accuracy in the range of 0-1. But Training classification accuracy is displayed >1. Validation accuracy seems correct. Attaching the screenshot below. Can you please have a look?\r\n\r\n**Screenshots**\r\n![Screenshot from 2022-03-17 14-13-02](https://user-images.githubusercontent.com/6376680/158874773-97c9a7cd-49a1-45fa-85c9-86b93533911b.png)\r\n\r\n**GaNDLF Version**\r\n0.0.14\r\n\r\n\n", "before_files": [{"content": "\"\"\"\nAll the metrics are to be called from here\n\"\"\"\nimport torch\nfrom sklearn.metrics import balanced_accuracy_score\nimport numpy as np\n\n\ndef classification_accuracy(output, label, params):\n    if params[\"problem_type\"] == \"classification\":\n        predicted_classes = torch.argmax(output, 1)\n    else:\n        predicted_classes = output\n    acc = torch.sum(predicted_classes == label) / len(label)\n    return acc\n\n\ndef balanced_acc_score(output, label, params):\n    if params[\"problem_type\"] == \"classification\":\n        predicted_classes = torch.argmax(output, 1)\n    else:\n        predicted_classes = output\n\n    return torch.from_numpy(\n        np.array(balanced_accuracy_score(predicted_classes.cpu(), label.cpu()))\n    )\n", "path": "GANDLF/metrics/regression.py"}], "after_files": [{"content": "\"\"\"\nAll the metrics are to be called from here\n\"\"\"\nimport torch\nfrom sklearn.metrics import balanced_accuracy_score\nimport numpy as np\n\n\ndef classification_accuracy(output, label, params):\n    if params[\"problem_type\"] == \"classification\":\n        predicted_classes = torch.argmax(output, 1)\n    else:\n        predicted_classes = output\n\n    acc = torch.sum(predicted_classes == label.squeeze()) / len(label)\n    return acc\n\n\ndef balanced_acc_score(output, label, params):\n    if params[\"problem_type\"] == \"classification\":\n        predicted_classes = torch.argmax(output, 1)\n    else:\n        predicted_classes = output\n\n    return torch.from_numpy(\n        np.array(balanced_accuracy_score(predicted_classes.cpu(), label.cpu()))\n    )\n", "path": "GANDLF/metrics/regression.py"}]}