diff --git a/docs/source/transforms.rst b/docs/source/transforms.rst
index 96513066..a9a1e9fa 100644
--- a/docs/source/transforms.rst
+++ b/docs/source/transforms.rst
@@ -297,6 +297,11 @@ Vanilla Transforms
     :members:
     :special-members: __call__
 
+`SqueezeDim`
+~~~~~~~~~~~~
+.. autoclass:: SqueezeDim
+    :members:
+    :special-members: __call__
 
 Dictionary-based Composables
 ----------------------------
@@ -538,6 +543,12 @@ Dictionary-based Composables
     :members:
     :special-members: __call__
 
+`SqueezeDimd`
+~~~~~~~~~~~~~
+.. autoclass:: SqueezeDimd
+    :members:
+    :special-members: __call__
+
 Transform Adaptors
 ------------------
 
diff --git a/monai/transforms/composables.py b/monai/transforms/composables.py
index b59e1fae..9e03135a 100644
--- a/monai/transforms/composables.py
+++ b/monai/transforms/composables.py
@@ -25,7 +25,8 @@ from monai.transforms.transforms import (AddChannel, AsChannelFirst, Flip, LoadN
                                          Rand2DElastic, Rand3DElastic, RandAffine, Resize, Rotate, Rotate90,
                                          ScaleIntensityRange, Spacing, SpatialCrop, Zoom, ToTensor, LoadPNG,
                                          AsChannelLast, ThresholdIntensity, AdjustContrast, CenterSpatialCrop,
-                                         CastToType, SpatialPad, RepeatChannel, ShiftIntensity, ScaleIntensity)
+                                         CastToType, SpatialPad, RepeatChannel, ShiftIntensity, ScaleIntensity,
+                                         SqueezeDim)
 from monai.transforms.utils import (create_grid, generate_pos_neg_label_crop_centers, generate_spatial_bounding_box)
 from monai.utils.misc import ensure_tuple
 
@@ -1404,6 +1405,29 @@ class DeleteKeysd(MapTransform):
         return {key: val for key, val in data.items() if key not in self.keys}
 
 
+class SqueezeDimd(MapTransform):
+    """
+    Dictionary-based wrapper of :py:class:`monai.transforms.transforms.SqueezeDim`.
+    """
+
+    def __init__(self, keys, dim=None):
+        """
+        Args:
+            keys (hashable items): keys of the corresponding items to be transformed.
+                See also: :py:class:`monai.transforms.compose.MapTransform`
+            dim (int): dimension to be squeezed.
+                Default: None (all dimensions of size 1 will be removed)
+        """
+        super().__init__(keys)
+        self.converter = SqueezeDim(dim=dim)
+
+    def __call__(self, data):
+        d = dict(data)
+        for key in self.keys:
+            d[key] = self.converter(d[key])
+        return d
+
+
 SpacingD = SpacingDict = Spacingd
 OrientationD = OrientationDict = Orientationd
 LoadNiftiD = LoadNiftiDict = LoadNiftid
@@ -1443,3 +1467,4 @@ RandRotateD = RandRotateDict = RandRotated
 ZoomD = ZoomDict = Zoomd
 RandZoomD = RandZoomDict = RandZoomd
 DeleteKeysD = DeleteKeysDict = DeleteKeysd
+SqueezeDimD = SqueezeDimDict = SqueezeDimd
diff --git a/monai/transforms/transforms.py b/monai/transforms/transforms.py
index 8853130f..80926c75 100644
--- a/monai/transforms/transforms.py
+++ b/monai/transforms/transforms.py
@@ -1738,3 +1738,26 @@ class Rand3DElastic(Randomizable, Transform):
             grid[:3] += gaussian(self.rand_offset[None])[0] * self.magnitude
             grid = self.rand_affine_grid(grid=grid)
         return self.resampler(img, grid, mode)
+
+
+class SqueezeDim(Transform):
+    """
+    Squeeze undesired unitary dimensions
+    """
+
+    def __init__(self, dim=None):
+        """
+        Args:
+            dim (int): dimension to be squeezed.
+                Default: None (all dimensions of size 1 will be removed)
+        """
+        if dim is not None:
+            assert isinstance(dim, int) and dim >= -1, 'invalid channel dimension.'
+        self.dim = dim
+
+    def __call__(self, img):
+        """
+        Args:
+            img (ndarray): numpy arrays with required dimension `dim` removed
+        """
+        return np.squeeze(img, self.dim)

Squeezing functionality in Monai transforms
**Is your feature request related to a problem? Please describe.**
I would like to feed 2D patches extracted from 3D images into a 2D U-Net, and I could not find a straightforward way to remove the redundant dimension. E.g. from size (B, C, X, Y, 1) to (B, C, X, Y), with B being batch size and C number of channels.

**Describe the solution you'd like**
A Monai transform that could perform similar to numpy.squeeze and composable for data preprocessing.

**Additional context**
My attempt to such transform:
```python
class SqueezeDim(Transform):
    """
    Squeeze unnecessary unitary dimensions
    """

    def __init__(self, dim=None):
        """
        Args:
            dim (int): dimension to be squeezed.
                Default: None (all dimensions of size 1 will be removed)
        """
        if dim is not None:
            assert isinstance(dim, int) and dim >= -1, 'invalid channel dimension.'
        self.dim = dim

    def __call__(self, img):
        """
        Args:
            data (dict): dictionary of numpy arrays with dim removed,
        """
        return np.squeeze(img, self.dim)

    
class SqueezeDimd(MapTransform):
    """
    Dictionary-based wrapper of :py:class:SqueezeDim`.
    """

    def __init__(self, keys, dim=None):
        """
        Args:
            keys (hashable items): keys of the corresponding items to be transformed.
                See also: :py:class:`monai.transforms.compose.MapTransform`
            dim (int): dimension to be squeezed.
                Default: None (all dimensions of size 1 will be removed)
        """
        super().__init__(keys)
        self.converter = SqueezeDim(dim=dim)

    def __call__(self, data):
        d = dict(data)
        for key in self.keys:
            d[key] = self.converter(d[key])
        return d
```


diff --git a/tests/test_squeezedim.py b/tests/test_squeezedim.py
new file mode 100644
index 00000000..e5dc852d
--- /dev/null
+++ b/tests/test_squeezedim.py
@@ -0,0 +1,76 @@
+# Copyright 2020 MONAI Consortium
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#     http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+import numpy as np
+from parameterized import parameterized
+from monai.transforms import SqueezeDim
+
+TEST_CASE_1 = [
+    {
+        'dim': None
+    },
+    np.random.rand(1, 2, 1, 3),
+    (2, 3)
+]
+
+TEST_CASE_2 = [
+    {
+        'dim': 2
+    },
+    np.random.rand(1, 2, 1, 8, 16),
+    (1, 2, 8, 16)
+]
+
+TEST_CASE_3 = [
+    {
+        'dim': -1
+    },
+    np.random.rand(1, 1, 16, 8, 1),
+    (1, 1, 16, 8)
+]
+
+TEST_CASE_4 = [
+    {},
+    np.random.rand(1, 2, 1, 3),
+    (2, 3)
+]
+
+TEST_CASE_5 = [
+    {
+        'dim': -2
+    },
+    np.random.rand(1, 1, 16, 8, 1),
+]
+
+TEST_CASE_6 = [
+    {
+        'dim': 0.5
+    },
+    np.random.rand(1, 1, 16, 8, 1),
+]
+
+
+class TestSqueezeDim(unittest.TestCase):
+
+    @parameterized.expand([TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_4])
+    def test_shape(self, input_param, test_data, expected_shape):
+        result = SqueezeDim(**input_param)(test_data)
+        self.assertTupleEqual(result.shape, expected_shape)
+
+    @parameterized.expand([TEST_CASE_5, TEST_CASE_6])
+    def test_invalid_inputs(self, input_param, test_data):
+        with self.assertRaises(AssertionError):
+            result = SqueezeDim(**input_param)(test_data)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/tests/test_squeezedimd.py b/tests/test_squeezedimd.py
new file mode 100644
index 00000000..d0df400a
--- /dev/null
+++ b/tests/test_squeezedimd.py
@@ -0,0 +1,103 @@
+# Copyright 2020 MONAI Consortium
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#     http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import unittest
+import numpy as np
+from parameterized import parameterized
+from monai.transforms import SqueezeDimd
+
+
+TEST_CASE_1 = [
+    {
+        'keys': ['img', 'seg'],
+        'dim': None
+    },
+    {
+        'img': np.random.rand(1, 2, 1, 3),
+        'seg': np.random.randint(0, 2, size=[1, 2, 1, 3]),
+    },
+    (2, 3)
+]
+
+TEST_CASE_2 = [
+    {
+        'keys': ['img', 'seg'],
+        'dim': 2
+    },
+    {
+        'img': np.random.rand(1, 2, 1, 8, 16),
+        'seg': np.random.randint(0, 2, size=[1, 2, 1, 8, 16]),
+    },
+    (1, 2, 8, 16)
+]
+
+TEST_CASE_3 = [
+    {
+        'keys': ['img', 'seg'],
+        'dim': -1
+    },
+    {
+        'img': np.random.rand(1, 1, 16, 8, 1),
+        'seg': np.random.randint(0, 2, size=[1, 1, 16, 8, 1]),
+    },
+    (1, 1, 16, 8)
+]
+
+TEST_CASE_4 = [
+    {
+        'keys': ['img', 'seg']
+    },
+    {
+        'img': np.random.rand(1, 2, 1, 3),
+        'seg': np.random.randint(0, 2, size=[1, 2, 1, 3]),
+    },
+    (2, 3)
+]
+
+TEST_CASE_5 = [
+    {
+        'keys': ['img', 'seg'],
+        'dim': -2
+    },
+    {
+        'img': np.random.rand(1, 1, 16, 8, 1),
+        'seg': np.random.randint(0, 2, size=[1, 1, 16, 8, 1]),
+    }
+]
+
+TEST_CASE_6 = [
+    {
+        'keys': ['img', 'seg'],
+        'dim': 0.5
+    },
+    {
+        'img': np.random.rand(1, 1, 16, 8, 1),
+        'seg': np.random.randint(0, 2, size=[1, 1, 16, 8, 1]),
+    }
+]
+
+
+class TestSqueezeDim(unittest.TestCase):
+
+    @parameterized.expand([TEST_CASE_1, TEST_CASE_2, TEST_CASE_3, TEST_CASE_4])
+    def test_shape(self, input_param, test_data, expected_shape):
+        result = SqueezeDimd(**input_param)(test_data)
+        self.assertTupleEqual(result['img'].shape, expected_shape)
+        self.assertTupleEqual(result['seg'].shape, expected_shape)
+
+    @parameterized.expand([TEST_CASE_5, TEST_CASE_6])
+    def test_invalid_inputs(self, input_param, test_data):
+        with self.assertRaises(AssertionError):
+            result = SqueezeDimd(**input_param)(test_data)
+
+
+if __name__ == '__main__':
+    unittest.main()

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest black flake8 mypy pytype
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
absl-py==1.4.0
attrs==22.2.0
black==22.8.0
cachetools==4.2.4
certifi==2021.5.30
charset-normalizer==2.0.12
click==8.0.4
coverage==6.2
cycler==0.11.0
dataclasses==0.8
decorator==4.4.2
flake8==5.0.4
google-auth==2.22.0
google-auth-oauthlib==0.4.6
grpcio==1.48.2
idna==3.10
imageio==2.15.0
importlab==0.8.1
importlib-metadata==4.8.3
iniconfig==1.1.1
kiwisolver==1.3.1
libcst==0.4.1
Markdown==3.3.7
matplotlib==3.3.4
mccabe==0.7.0
-e git+https://github.com/Project-MONAI/MONAI.git@dfe37cf9e364ead5bdc7d61b26b21bf4ee765cda#egg=monai
mypy==0.971
mypy-extensions==1.0.0
networkx==2.5.1
nibabel==3.2.2
ninja==1.11.1.1
numpy==1.19.5
oauthlib==3.2.2
packaging==21.3
parameterized==0.8.1
pathspec==0.9.0
Pillow==8.4.0
platformdirs==2.4.0
pluggy==1.0.0
protobuf==3.19.6
py==1.11.0
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycodestyle==2.9.1
pyflakes==2.5.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytorch-ignite==0.3.0
pytype==2022.1.5
PyWavelets==1.1.1
PyYAML==6.0.1
requests==2.27.1
requests-oauthlib==2.0.0
rsa==4.9
scikit-image==0.17.2
scipy==1.5.4
six==1.17.0
tabulate==0.8.10
tensorboard==2.10.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tifffile==2020.9.3
toml==0.10.2
tomli==1.2.3
torch==1.10.2
typed-ast==1.5.5
typing-inspect==0.9.0
typing_extensions==4.1.1
urllib3==1.26.20
Werkzeug==2.0.3
zipp==3.6.0

name: MONAI
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - absl-py==1.4.0
      - attrs==22.2.0
      - black==22.8.0
      - cachetools==4.2.4
      - charset-normalizer==2.0.12
      - click==8.0.4
      - coverage==6.2
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==4.4.2
      - flake8==5.0.4
      - google-auth==2.22.0
      - google-auth-oauthlib==0.4.6
      - grpcio==1.48.2
      - idna==3.10
      - imageio==2.15.0
      - importlab==0.8.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - kiwisolver==1.3.1
      - libcst==0.4.1
      - markdown==3.3.7
      - matplotlib==3.3.4
      - mccabe==0.7.0
      - mypy==0.971
      - mypy-extensions==1.0.0
      - networkx==2.5.1
      - nibabel==3.2.2
      - ninja==1.11.1.1
      - numpy==1.19.5
      - oauthlib==3.2.2
      - packaging==21.3
      - parameterized==0.8.1
      - pathspec==0.9.0
      - pillow==8.4.0
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - protobuf==3.19.6
      - py==1.11.0
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytorch-ignite==0.3.0
      - pytype==2022.1.5
      - pywavelets==1.1.1
      - pyyaml==6.0.1
      - requests==2.27.1
      - requests-oauthlib==2.0.0
      - rsa==4.9
      - scikit-image==0.17.2
      - scipy==1.5.4
      - six==1.17.0
      - tabulate==0.8.10
      - tensorboard==2.10.1
      - tensorboard-data-server==0.6.1
      - tensorboard-plugin-wit==1.8.1
      - tifffile==2020.9.3
      - toml==0.10.2
      - tomli==1.2.3
      - torch==1.10.2
      - typed-ast==1.5.5
      - typing-extensions==4.1.1
      - typing-inspect==0.9.0
      - urllib3==1.26.20
      - werkzeug==2.0.3
      - zipp==3.6.0
prefix: /opt/conda/envs/MONAI

tests/test_squeezedim.py::TestSqueezeDim::test_invalid_inputs_0 tests/test_squeezedim.py::TestSqueezeDim::test_invalid_inputs_1 tests/test_squeezedim.py::TestSqueezeDim::test_shape_0 tests/test_squeezedim.py::TestSqueezeDim::test_shape_1 tests/test_squeezedim.py::TestSqueezeDim::test_shape_2 tests/test_squeezedim.py::TestSqueezeDim::test_shape_3 tests/test_squeezedimd.py::TestSqueezeDim::test_invalid_inputs_0 tests/test_squeezedimd.py::TestSqueezeDim::test_invalid_inputs_1 tests/test_squeezedimd.py::TestSqueezeDim::test_shape_0 tests/test_squeezedimd.py::TestSqueezeDim::test_shape_1 tests/test_squeezedimd.py::TestSqueezeDim::test_shape_2 tests/test_squeezedimd.py::TestSqueezeDim::test_shape_3
monai/transforms/transforms.py docs/source/transforms.rst monai/transforms/composables.py
monai/transforms/transforms.py docs/source/transforms.rst monai/transforms/composables.py