We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add an error check for compute dimensions not supported by GaNDLF
### > I think the error message is caused by the yaml file. My input image size is 128 x 128 . 
> 
 **> this is error mesage  :**

`(venv_gandlf) C:\Users\pc\GaNDLF>python gandlf_run  -c ./images_and_labels/model.yaml -i ./images_and_labels/train.csv -m ./images_and_labels/model -t True -d cpu
WARNING: Initializing 'norm_type' as 'batch'
WARNING: Initializing 'verbose' as False
WARNING: Initializing 'medcam_enabled' as False
WARNING: Initializing 'save_training' as False
WARNING: Initializing 'save_output' as False
WARNING: Initializing 'in_memory' as False
WARNING: Initializing 'pin_memory_dataloader' as False
WARNING: Initializing 'enable_padding' as False
WARNING: Initializing 'scaling_factor' as 1
WARNING: Initializing 'clip_grad' as None
WARNING: Initializing 'track_memory_usage' as False
WARNING: Initializing 'print_rgb_label_warning' as True
WARNING: Initializing 'data_postprocessing' as {}
WARNING: Initializing 'grid_aggregator_overlap' as crop
WARNING: Initializing 'clip_mode' as None
WARNING: Setting default step_size to: 0.02
Trying to resume training without changing any parameters from previous run.
Using previously saved parameter file ./images_and_labels/model\parameters.pkl
Using previously saved testing data ./images_and_labels/model\testing_0\data_testing.pkl
Using previously saved training+validation data ./images_and_labels/model\testing_0\data_trainAndVal.pkl
Number of channels :  1
Constructing queue for train data: 100%|████████████████████████| 643/643 [00:02<00:00, 216.35it/s]
C:\Users\pc\anaconda3\envs\venv_gandlf\lib\site-packages\torch\utils\data\dataloader.py:477: UserWarning: This DataLoader will create 16 worker processes in total. Our suggested max number of worker in current system is 4 (`cpuset` is not taken into account), which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
  cpuset_checked))
Calculating weights
Constructing queue for penalty data: 100%|██████████████████████| 643/643 [00:02<00:00, 241.46it/s]
Looping over training data for penalty calculation: 100%|███████| 643/643 [00:05<00:00, 121.90it/s]
Constructing queue for validation data: 100%|███████████████████| 161/161 [00:01<00:00, 124.04it/s]
All Keys :  ['subject_id', '1', 'spacing', 'label', 'path_to_metadata']
Traceback (most recent call last):
  File "gandlf_run", line 116, in <module>
    args.reset,
  File "C:\Users\pc\GaNDLF\GANDLF\cli\main_run.py", line 91, in main_run
    reset=reset,
  File "C:\Users\pc\GaNDLF\GANDLF\training_manager.py", line 254, in TrainingManager
    testing_data=testingData,
  File "C:\Users\pc\GaNDLF\GANDLF\compute\training_loop.py", line 239, in training_loop
    ) = create_pytorch_objects(params, training_data, validation_data, device)
  File "C:\Users\pc\GaNDLF\GANDLF\compute\generic.py", line 69, in create_pytorch_objects
    model = get_model(parameters)
  File "C:\Users\pc\GaNDLF\GANDLF\models\__init__.py", line 106, in get_model
    return global_models_dict[params["model"]["architecture"]](parameters=params)
  File "C:\Users\pc\GaNDLF\GANDLF\models\unet.py", line 41, in __init__
    conv=self.Conv,
  File "C:\Users\pc\anaconda3\envs\venv_gandlf\lib\site-packages\torch\nn\modules\module.py", line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'unet' object has no attribute 'Conv'`


**> And this is my yaml file**


[model.pdf](https://github.com/CBICA/GaNDLF/files/8631955/model.pdf)

_Originally posted by @HILALOZTEMEL in https://github.com/CBICA/GaNDLF/discussions/427_

--- 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/models/modelBase.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """All Models in GANDLF are to be derived from this base class code."""
3 
4 import torch
5 import torch.nn as nn
6 import torch.nn.functional as F
7 
8 from GANDLF.utils import get_linear_interpolation_mode
9 from GANDLF.utils.modelbase import get_modelbase_final_layer
10 from GANDLF.models.seg_modules.average_pool import (
11     GlobalAveragePooling3D,
12     GlobalAveragePooling2D,
13 )
14 
15 
16 class ModelBase(nn.Module):
17     """
18     This is the base model class that all other architectures will need to derive from
19     """
20 
21     def __init__(self, parameters):
22         """
23         This defines all defaults that the model base uses
24 
25         Args:
26             parameters (dict): This is a dictionary of all parameters that are needed for the model.
27         """
28         super(ModelBase, self).__init__()
29         self.model_name = parameters["model"]["architecture"]
30         self.n_dimensions = parameters["model"]["dimension"]
31         self.n_channels = parameters["model"]["num_channels"]
32         if "num_classes" in parameters["model"]:
33             self.n_classes = parameters["model"]["num_classes"]
34         else:
35             self.n_classes = len(parameters["model"]["class_list"])
36         self.base_filters = parameters["model"]["base_filters"]
37         self.norm_type = parameters["model"]["norm_type"]
38         self.patch_size = parameters["patch_size"]
39         self.batch_size = parameters["batch_size"]
40         self.amp = parameters["model"]["amp"]
41         self.final_convolution_layer = self.get_final_layer(
42             parameters["model"]["final_layer"]
43         )
44 
45         self.linear_interpolation_mode = get_linear_interpolation_mode(
46             self.n_dimensions
47         )
48 
49         self.sigmoid_input_multiplier = parameters["model"].get(
50             "sigmoid_input_multiplier", 1.0
51         )
52 
53         # based on dimensionality, the following need to defined:
54         # convolution, batch_norm, instancenorm, dropout
55         if self.n_dimensions == 2:
56             self.Conv = nn.Conv2d
57             self.ConvTranspose = nn.ConvTranspose2d
58             self.InstanceNorm = nn.InstanceNorm2d
59             self.Dropout = nn.Dropout2d
60             self.BatchNorm = nn.BatchNorm2d
61             self.MaxPool = nn.MaxPool2d
62             self.AvgPool = nn.AvgPool2d
63             self.AdaptiveAvgPool = nn.AdaptiveAvgPool2d
64             self.AdaptiveMaxPool = nn.AdaptiveMaxPool2d
65             self.GlobalAvgPool = GlobalAveragePooling2D
66             self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)
67 
68         elif self.n_dimensions == 3:
69             self.Conv = nn.Conv3d
70             self.ConvTranspose = nn.ConvTranspose3d
71             self.InstanceNorm = nn.InstanceNorm3d
72             self.Dropout = nn.Dropout3d
73             self.BatchNorm = nn.BatchNorm3d
74             self.MaxPool = nn.MaxPool3d
75             self.AvgPool = nn.AvgPool3d
76             self.AdaptiveAvgPool = nn.AdaptiveAvgPool3d
77             self.AdaptiveMaxPool = nn.AdaptiveMaxPool3d
78             self.GlobalAvgPool = GlobalAveragePooling3D
79             self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)
80 
81     def get_final_layer(self, final_convolution_layer):
82         return get_modelbase_final_layer(final_convolution_layer)
83 
84     def get_norm_type(self, norm_type, dimensions):
85         """
86         This function gets the normalization type for the model.
87 
88         Args:
89             norm_type (str): Normalization type as a string.
90             dimensions (str): The dimensionality of the model.
91 
92         Returns:
93             _InstanceNorm or _BatchNorm: The normalization type for the model.
94         """
95         if dimensions == 3:
96             if norm_type == "batch":
97                 norm_type = nn.BatchNorm3d
98             elif norm_type == "instance":
99                 norm_type = nn.InstanceNorm3d
100             else:
101                 norm_type = None
102         elif dimensions == 2:
103             if norm_type == "batch":
104                 norm_type = nn.BatchNorm2d
105             elif norm_type == "instance":
106                 norm_type = nn.InstanceNorm2d
107             else:
108                 norm_type = None
109 
110         return norm_type
111
```
--- 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/models/modelBase.py b/GANDLF/models/modelBase.py
--- a/GANDLF/models/modelBase.py
+++ b/GANDLF/models/modelBase.py
@@ -78,6 +78,13 @@
             self.GlobalAvgPool = GlobalAveragePooling3D
             self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)
 
+        else:
+            raise ValueError(
+                "GaNDLF only supports 2D and 3D computations. {}D computations are not currently supported".format(
+                    self.n_dimensions
+                )
+            )
+
     def get_final_layer(self, final_convolution_layer):
         return get_modelbase_final_layer(final_convolution_layer)

{"golden_diff": "diff --git a/GANDLF/models/modelBase.py b/GANDLF/models/modelBase.py\n--- a/GANDLF/models/modelBase.py\n+++ b/GANDLF/models/modelBase.py\n@@ -78,6 +78,13 @@\n             self.GlobalAvgPool = GlobalAveragePooling3D\n             self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)\n \n+        else:\n+            raise ValueError(\n+                \"GaNDLF only supports 2D and 3D computations. {}D computations are not currently supported\".format(\n+                    self.n_dimensions\n+                )\n+            )\n+\n     def get_final_layer(self, final_convolution_layer):\n         return get_modelbase_final_layer(final_convolution_layer)\n", "issue": "Add an error check for compute dimensions not supported by GaNDLF\n### > I think the error message is caused by the yaml file. My input image size is 128 x 128 . \r\n> \r\n **> this is error mesage  :**\r\n\r\n`(venv_gandlf) C:\\Users\\pc\\GaNDLF>python gandlf_run  -c ./images_and_labels/model.yaml -i ./images_and_labels/train.csv -m ./images_and_labels/model -t True -d cpu\r\nWARNING: Initializing 'norm_type' as 'batch'\r\nWARNING: Initializing 'verbose' as False\r\nWARNING: Initializing 'medcam_enabled' as False\r\nWARNING: Initializing 'save_training' as False\r\nWARNING: Initializing 'save_output' as False\r\nWARNING: Initializing 'in_memory' as False\r\nWARNING: Initializing 'pin_memory_dataloader' as False\r\nWARNING: Initializing 'enable_padding' as False\r\nWARNING: Initializing 'scaling_factor' as 1\r\nWARNING: Initializing 'clip_grad' as None\r\nWARNING: Initializing 'track_memory_usage' as False\r\nWARNING: Initializing 'print_rgb_label_warning' as True\r\nWARNING: Initializing 'data_postprocessing' as {}\r\nWARNING: Initializing 'grid_aggregator_overlap' as crop\r\nWARNING: Initializing 'clip_mode' as None\r\nWARNING: Setting default step_size to: 0.02\r\nTrying to resume training without changing any parameters from previous run.\r\nUsing previously saved parameter file ./images_and_labels/model\\parameters.pkl\r\nUsing previously saved testing data ./images_and_labels/model\\testing_0\\data_testing.pkl\r\nUsing previously saved training+validation data ./images_and_labels/model\\testing_0\\data_trainAndVal.pkl\r\nNumber of channels :  1\r\nConstructing queue for train data: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 643/643 [00:02<00:00, 216.35it/s]\r\nC:\\Users\\pc\\anaconda3\\envs\\venv_gandlf\\lib\\site-packages\\torch\\utils\\data\\dataloader.py:477: UserWarning: This DataLoader will create 16 worker processes in total. Our suggested max number of worker in current system is 4 (`cpuset` is not taken into account), which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.\r\n  cpuset_checked))\r\nCalculating weights\r\nConstructing queue for penalty data: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 643/643 [00:02<00:00, 241.46it/s]\r\nLooping over training data for penalty calculation: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 643/643 [00:05<00:00, 121.90it/s]\r\nConstructing queue for validation data: 100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 161/161 [00:01<00:00, 124.04it/s]\r\nAll Keys :  ['subject_id', '1', 'spacing', 'label', 'path_to_metadata']\r\nTraceback (most recent call last):\r\n  File \"gandlf_run\", line 116, in <module>\r\n    args.reset,\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\cli\\main_run.py\", line 91, in main_run\r\n    reset=reset,\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\training_manager.py\", line 254, in TrainingManager\r\n    testing_data=testingData,\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\compute\\training_loop.py\", line 239, in training_loop\r\n    ) = create_pytorch_objects(params, training_data, validation_data, device)\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\compute\\generic.py\", line 69, in create_pytorch_objects\r\n    model = get_model(parameters)\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\models\\__init__.py\", line 106, in get_model\r\n    return global_models_dict[params[\"model\"][\"architecture\"]](parameters=params)\r\n  File \"C:\\Users\\pc\\GaNDLF\\GANDLF\\models\\unet.py\", line 41, in __init__\r\n    conv=self.Conv,\r\n  File \"C:\\Users\\pc\\anaconda3\\envs\\venv_gandlf\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 948, in __getattr__\r\n    type(self).__name__, name))\r\nAttributeError: 'unet' object has no attribute 'Conv'`\r\n\r\n\r\n**> And this is my yaml file**\r\n\r\n\r\n[model.pdf](https://github.com/CBICA/GaNDLF/files/8631955/model.pdf)\r\n\r\n_Originally posted by @HILALOZTEMEL in https://github.com/CBICA/GaNDLF/discussions/427_\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"All Models in GANDLF are to be derived from this base class code.\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom GANDLF.utils import get_linear_interpolation_mode\nfrom GANDLF.utils.modelbase import get_modelbase_final_layer\nfrom GANDLF.models.seg_modules.average_pool import (\n    GlobalAveragePooling3D,\n    GlobalAveragePooling2D,\n)\n\n\nclass ModelBase(nn.Module):\n    \"\"\"\n    This is the base model class that all other architectures will need to derive from\n    \"\"\"\n\n    def __init__(self, parameters):\n        \"\"\"\n        This defines all defaults that the model base uses\n\n        Args:\n            parameters (dict): This is a dictionary of all parameters that are needed for the model.\n        \"\"\"\n        super(ModelBase, self).__init__()\n        self.model_name = parameters[\"model\"][\"architecture\"]\n        self.n_dimensions = parameters[\"model\"][\"dimension\"]\n        self.n_channels = parameters[\"model\"][\"num_channels\"]\n        if \"num_classes\" in parameters[\"model\"]:\n            self.n_classes = parameters[\"model\"][\"num_classes\"]\n        else:\n            self.n_classes = len(parameters[\"model\"][\"class_list\"])\n        self.base_filters = parameters[\"model\"][\"base_filters\"]\n        self.norm_type = parameters[\"model\"][\"norm_type\"]\n        self.patch_size = parameters[\"patch_size\"]\n        self.batch_size = parameters[\"batch_size\"]\n        self.amp = parameters[\"model\"][\"amp\"]\n        self.final_convolution_layer = self.get_final_layer(\n            parameters[\"model\"][\"final_layer\"]\n        )\n\n        self.linear_interpolation_mode = get_linear_interpolation_mode(\n            self.n_dimensions\n        )\n\n        self.sigmoid_input_multiplier = parameters[\"model\"].get(\n            \"sigmoid_input_multiplier\", 1.0\n        )\n\n        # based on dimensionality, the following need to defined:\n        # convolution, batch_norm, instancenorm, dropout\n        if self.n_dimensions == 2:\n            self.Conv = nn.Conv2d\n            self.ConvTranspose = nn.ConvTranspose2d\n            self.InstanceNorm = nn.InstanceNorm2d\n            self.Dropout = nn.Dropout2d\n            self.BatchNorm = nn.BatchNorm2d\n            self.MaxPool = nn.MaxPool2d\n            self.AvgPool = nn.AvgPool2d\n            self.AdaptiveAvgPool = nn.AdaptiveAvgPool2d\n            self.AdaptiveMaxPool = nn.AdaptiveMaxPool2d\n            self.GlobalAvgPool = GlobalAveragePooling2D\n            self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)\n\n        elif self.n_dimensions == 3:\n            self.Conv = nn.Conv3d\n            self.ConvTranspose = nn.ConvTranspose3d\n            self.InstanceNorm = nn.InstanceNorm3d\n            self.Dropout = nn.Dropout3d\n            self.BatchNorm = nn.BatchNorm3d\n            self.MaxPool = nn.MaxPool3d\n            self.AvgPool = nn.AvgPool3d\n            self.AdaptiveAvgPool = nn.AdaptiveAvgPool3d\n            self.AdaptiveMaxPool = nn.AdaptiveMaxPool3d\n            self.GlobalAvgPool = GlobalAveragePooling3D\n            self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)\n\n    def get_final_layer(self, final_convolution_layer):\n        return get_modelbase_final_layer(final_convolution_layer)\n\n    def get_norm_type(self, norm_type, dimensions):\n        \"\"\"\n        This function gets the normalization type for the model.\n\n        Args:\n            norm_type (str): Normalization type as a string.\n            dimensions (str): The dimensionality of the model.\n\n        Returns:\n            _InstanceNorm or _BatchNorm: The normalization type for the model.\n        \"\"\"\n        if dimensions == 3:\n            if norm_type == \"batch\":\n                norm_type = nn.BatchNorm3d\n            elif norm_type == \"instance\":\n                norm_type = nn.InstanceNorm3d\n            else:\n                norm_type = None\n        elif dimensions == 2:\n            if norm_type == \"batch\":\n                norm_type = nn.BatchNorm2d\n            elif norm_type == \"instance\":\n                norm_type = nn.InstanceNorm2d\n            else:\n                norm_type = None\n\n        return norm_type\n", "path": "GANDLF/models/modelBase.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"All Models in GANDLF are to be derived from this base class code.\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom GANDLF.utils import get_linear_interpolation_mode\nfrom GANDLF.utils.modelbase import get_modelbase_final_layer\nfrom GANDLF.models.seg_modules.average_pool import (\n    GlobalAveragePooling3D,\n    GlobalAveragePooling2D,\n)\n\n\nclass ModelBase(nn.Module):\n    \"\"\"\n    This is the base model class that all other architectures will need to derive from\n    \"\"\"\n\n    def __init__(self, parameters):\n        \"\"\"\n        This defines all defaults that the model base uses\n\n        Args:\n            parameters (dict): This is a dictionary of all parameters that are needed for the model.\n        \"\"\"\n        super(ModelBase, self).__init__()\n        self.model_name = parameters[\"model\"][\"architecture\"]\n        self.n_dimensions = parameters[\"model\"][\"dimension\"]\n        self.n_channels = parameters[\"model\"][\"num_channels\"]\n        if \"num_classes\" in parameters[\"model\"]:\n            self.n_classes = parameters[\"model\"][\"num_classes\"]\n        else:\n            self.n_classes = len(parameters[\"model\"][\"class_list\"])\n        self.base_filters = parameters[\"model\"][\"base_filters\"]\n        self.norm_type = parameters[\"model\"][\"norm_type\"]\n        self.patch_size = parameters[\"patch_size\"]\n        self.batch_size = parameters[\"batch_size\"]\n        self.amp = parameters[\"model\"][\"amp\"]\n        self.final_convolution_layer = self.get_final_layer(\n            parameters[\"model\"][\"final_layer\"]\n        )\n\n        self.linear_interpolation_mode = get_linear_interpolation_mode(\n            self.n_dimensions\n        )\n\n        self.sigmoid_input_multiplier = parameters[\"model\"].get(\n            \"sigmoid_input_multiplier\", 1.0\n        )\n\n        # based on dimensionality, the following need to defined:\n        # convolution, batch_norm, instancenorm, dropout\n        if self.n_dimensions == 2:\n            self.Conv = nn.Conv2d\n            self.ConvTranspose = nn.ConvTranspose2d\n            self.InstanceNorm = nn.InstanceNorm2d\n            self.Dropout = nn.Dropout2d\n            self.BatchNorm = nn.BatchNorm2d\n            self.MaxPool = nn.MaxPool2d\n            self.AvgPool = nn.AvgPool2d\n            self.AdaptiveAvgPool = nn.AdaptiveAvgPool2d\n            self.AdaptiveMaxPool = nn.AdaptiveMaxPool2d\n            self.GlobalAvgPool = GlobalAveragePooling2D\n            self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)\n\n        elif self.n_dimensions == 3:\n            self.Conv = nn.Conv3d\n            self.ConvTranspose = nn.ConvTranspose3d\n            self.InstanceNorm = nn.InstanceNorm3d\n            self.Dropout = nn.Dropout3d\n            self.BatchNorm = nn.BatchNorm3d\n            self.MaxPool = nn.MaxPool3d\n            self.AvgPool = nn.AvgPool3d\n            self.AdaptiveAvgPool = nn.AdaptiveAvgPool3d\n            self.AdaptiveMaxPool = nn.AdaptiveMaxPool3d\n            self.GlobalAvgPool = GlobalAveragePooling3D\n            self.Norm = self.get_norm_type(self.norm_type.lower(), self.n_dimensions)\n\n        else:\n            raise ValueError(\n                \"GaNDLF only supports 2D and 3D computations. {}D computations are not currently supported\".format(\n                    self.n_dimensions\n                )\n            )\n\n    def get_final_layer(self, final_convolution_layer):\n        return get_modelbase_final_layer(final_convolution_layer)\n\n    def get_norm_type(self, norm_type, dimensions):\n        \"\"\"\n        This function gets the normalization type for the model.\n\n        Args:\n            norm_type (str): Normalization type as a string.\n            dimensions (str): The dimensionality of the model.\n\n        Returns:\n            _InstanceNorm or _BatchNorm: The normalization type for the model.\n        \"\"\"\n        if dimensions == 3:\n            if norm_type == \"batch\":\n                norm_type = nn.BatchNorm3d\n            elif norm_type == \"instance\":\n                norm_type = nn.InstanceNorm3d\n            else:\n                norm_type = None\n        elif dimensions == 2:\n            if norm_type == \"batch\":\n                norm_type = nn.BatchNorm2d\n            elif norm_type == \"instance\":\n                norm_type = nn.InstanceNorm2d\n            else:\n                norm_type = None\n\n        return norm_type\n", "path": "GANDLF/models/modelBase.py"}]}