We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] Pytorch dataloader because of transforms and shuffle=false
## 🐛🐛 Bug Report


### ⚗️ Current Behavior
A clear and concise description of the behavior.

```python
import hub
ds = hub.load("hub://activeloop/mnist-test")

dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={"images": None, "labels": None})
for (images, labels) in dataloader:
  print(images.shape, labels.shape)
  break
```

```
Opening dataset in read-only mode as you don't have write permissions.
hub://activeloop/mnist-test loaded successfully.
This dataset can be visualized at https://app.activeloop.ai/activeloop/mnist-test.
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-21-22b652d8dbed>](https://localhost:8080/#) in <module>()
      4 dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={"images": None, "labels": None})
      5 for (images, labels) in dataloader:
----> 6   print(images.shape, labels.shape)
      7   break

AttributeError: 'str' object has no attribute 'shape'
```

but when you remove the argument `transform` from dataloader that script works.

### ⚙️ Environment

- Google colab


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `hub/integrations/pytorch/common.py`
Content:
```
1 from typing import Callable, Dict, List, Optional
2 from hub.util.iterable_ordered_dict import IterableOrderedDict
3 import numpy as np
4 
5 
6 def collate_fn(batch):
7     import torch
8 
9     elem = batch[0]
10 
11     if isinstance(elem, IterableOrderedDict):
12         return IterableOrderedDict(
13             (key, collate_fn([d[key] for d in batch])) for key in elem.keys()
14         )
15 
16     if isinstance(elem, np.ndarray) and elem.size > 0 and isinstance(elem[0], str):
17         batch = [it[0] for it in batch]
18     return torch.utils.data._utils.collate.default_collate(batch)
19 
20 
21 def convert_fn(data):
22     import torch
23 
24     if isinstance(data, IterableOrderedDict):
25         return IterableOrderedDict((k, convert_fn(v)) for k, v in data.items())
26     if isinstance(data, np.ndarray) and data.size > 0 and isinstance(data[0], str):
27         data = data[0]
28 
29     return torch.utils.data._utils.collate.default_convert(data)
30 
31 
32 class PytorchTransformFunction:
33     def __init__(
34         self,
35         transform_dict: Optional[Dict[str, Optional[Callable]]] = None,
36         composite_transform: Optional[Callable] = None,
37         tensors: List[str] = None,
38     ) -> None:
39         self.composite_transform = composite_transform
40         self.transform_dict = transform_dict
41         tensors = tensors or []
42 
43         if transform_dict is not None:
44             for tensor in transform_dict:
45                 if tensor not in tensors:
46                     raise ValueError(f"Invalid transform. Tensor {tensor} not found.")
47 
48     def __call__(self, data_in: Dict) -> Dict:
49         if self.composite_transform is not None:
50             return self.composite_transform(data_in)
51         elif self.transform_dict is not None:
52             data_out = {}
53             for tensor, fn in self.transform_dict.items():
54                 value = data_in[tensor]
55                 data_out[tensor] = value if fn is None else fn(value)
56             return data_out
57         return data_in
58
```
--- 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/hub/integrations/pytorch/common.py b/hub/integrations/pytorch/common.py
--- a/hub/integrations/pytorch/common.py
+++ b/hub/integrations/pytorch/common.py
@@ -53,5 +53,6 @@
             for tensor, fn in self.transform_dict.items():
                 value = data_in[tensor]
                 data_out[tensor] = value if fn is None else fn(value)
+            data_out = IterableOrderedDict(data_out)
             return data_out
         return data_in

{"golden_diff": "diff --git a/hub/integrations/pytorch/common.py b/hub/integrations/pytorch/common.py\n--- a/hub/integrations/pytorch/common.py\n+++ b/hub/integrations/pytorch/common.py\n@@ -53,5 +53,6 @@\n             for tensor, fn in self.transform_dict.items():\n                 value = data_in[tensor]\n                 data_out[tensor] = value if fn is None else fn(value)\n+            data_out = IterableOrderedDict(data_out)\n             return data_out\n         return data_in\n", "issue": "[BUG] Pytorch dataloader because of transforms and shuffle=false\n## \ud83d\udc1b\ud83d\udc1b Bug Report\r\n\r\n\r\n### \u2697\ufe0f Current Behavior\r\nA clear and concise description of the behavior.\r\n\r\n```python\r\nimport hub\r\nds = hub.load(\"hub://activeloop/mnist-test\")\r\n\r\ndataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={\"images\": None, \"labels\": None})\r\nfor (images, labels) in dataloader:\r\n  print(images.shape, labels.shape)\r\n  break\r\n```\r\n\r\n```\r\nOpening dataset in read-only mode as you don't have write permissions.\r\nhub://activeloop/mnist-test loaded successfully.\r\nThis dataset can be visualized at https://app.activeloop.ai/activeloop/mnist-test.\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n[<ipython-input-21-22b652d8dbed>](https://localhost:8080/#) in <module>()\r\n      4 dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={\"images\": None, \"labels\": None})\r\n      5 for (images, labels) in dataloader:\r\n----> 6   print(images.shape, labels.shape)\r\n      7   break\r\n\r\nAttributeError: 'str' object has no attribute 'shape'\r\n```\r\n\r\nbut when you remove the argument `transform` from dataloader that script works.\r\n\r\n### \u2699\ufe0f Environment\r\n\r\n- Google colab\r\n\n", "before_files": [{"content": "from typing import Callable, Dict, List, Optional\nfrom hub.util.iterable_ordered_dict import IterableOrderedDict\nimport numpy as np\n\n\ndef collate_fn(batch):\n    import torch\n\n    elem = batch[0]\n\n    if isinstance(elem, IterableOrderedDict):\n        return IterableOrderedDict(\n            (key, collate_fn([d[key] for d in batch])) for key in elem.keys()\n        )\n\n    if isinstance(elem, np.ndarray) and elem.size > 0 and isinstance(elem[0], str):\n        batch = [it[0] for it in batch]\n    return torch.utils.data._utils.collate.default_collate(batch)\n\n\ndef convert_fn(data):\n    import torch\n\n    if isinstance(data, IterableOrderedDict):\n        return IterableOrderedDict((k, convert_fn(v)) for k, v in data.items())\n    if isinstance(data, np.ndarray) and data.size > 0 and isinstance(data[0], str):\n        data = data[0]\n\n    return torch.utils.data._utils.collate.default_convert(data)\n\n\nclass PytorchTransformFunction:\n    def __init__(\n        self,\n        transform_dict: Optional[Dict[str, Optional[Callable]]] = None,\n        composite_transform: Optional[Callable] = None,\n        tensors: List[str] = None,\n    ) -> None:\n        self.composite_transform = composite_transform\n        self.transform_dict = transform_dict\n        tensors = tensors or []\n\n        if transform_dict is not None:\n            for tensor in transform_dict:\n                if tensor not in tensors:\n                    raise ValueError(f\"Invalid transform. Tensor {tensor} not found.\")\n\n    def __call__(self, data_in: Dict) -> Dict:\n        if self.composite_transform is not None:\n            return self.composite_transform(data_in)\n        elif self.transform_dict is not None:\n            data_out = {}\n            for tensor, fn in self.transform_dict.items():\n                value = data_in[tensor]\n                data_out[tensor] = value if fn is None else fn(value)\n            return data_out\n        return data_in\n", "path": "hub/integrations/pytorch/common.py"}], "after_files": [{"content": "from typing import Callable, Dict, List, Optional\nfrom hub.util.iterable_ordered_dict import IterableOrderedDict\nimport numpy as np\n\n\ndef collate_fn(batch):\n    import torch\n\n    elem = batch[0]\n\n    if isinstance(elem, IterableOrderedDict):\n        return IterableOrderedDict(\n            (key, collate_fn([d[key] for d in batch])) for key in elem.keys()\n        )\n\n    if isinstance(elem, np.ndarray) and elem.size > 0 and isinstance(elem[0], str):\n        batch = [it[0] for it in batch]\n    return torch.utils.data._utils.collate.default_collate(batch)\n\n\ndef convert_fn(data):\n    import torch\n\n    if isinstance(data, IterableOrderedDict):\n        return IterableOrderedDict((k, convert_fn(v)) for k, v in data.items())\n    if isinstance(data, np.ndarray) and data.size > 0 and isinstance(data[0], str):\n        data = data[0]\n\n    return torch.utils.data._utils.collate.default_convert(data)\n\n\nclass PytorchTransformFunction:\n    def __init__(\n        self,\n        transform_dict: Optional[Dict[str, Optional[Callable]]] = None,\n        composite_transform: Optional[Callable] = None,\n        tensors: List[str] = None,\n    ) -> None:\n        self.composite_transform = composite_transform\n        self.transform_dict = transform_dict\n        tensors = tensors or []\n\n        if transform_dict is not None:\n            for tensor in transform_dict:\n                if tensor not in tensors:\n                    raise ValueError(f\"Invalid transform. Tensor {tensor} not found.\")\n\n    def __call__(self, data_in: Dict) -> Dict:\n        if self.composite_transform is not None:\n            return self.composite_transform(data_in)\n        elif self.transform_dict is not None:\n            data_out = {}\n            for tensor, fn in self.transform_dict.items():\n                value = data_in[tensor]\n                data_out[tensor] = value if fn is None else fn(value)\n            data_out = IterableOrderedDict(data_out)\n            return data_out\n        return data_in\n", "path": "hub/integrations/pytorch/common.py"}]}