Hi @JuanFMontesinos
Thanks a lot for this example.
I have change with imageio.imread() but I get the same error:

TypeError                                 Traceback (most recent call last)
 in 
----> 1 for original_img, noisy_img in train_loader:
2         originalImage = original_img
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data\dataloader.py in next(self)
352
353     def next(self):
–> 354         data = self._next_data()
355         self._num_yielded += 1
356         if self._dataset_kind == _DatasetKind.Iterable and \
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data\dataloader.py in _next_data(self)
392     def _next_data(self):
393         index = self._next_index()  # may raise StopIteration
–> 394         data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
395         if self._pin_memory:
396             data = _utils.pin_memory.pin_memory(data)
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data_utils\fetch.py in fetch(self, possibly_batched_index)
45         else:
46             data = self.dataset[possibly_batched_index]
—> 47         return self.collate_fn(data)
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data_utils\collate.py in default_collate(batch)
82             raise RuntimeError(‘each element in list of batch should be of equal size’)
83         transposed = zip(*batch)
—> 84         return [default_collate(samples) for samples in transposed]
85
86     raise TypeError(default_collate_err_msg_format.format(elem_type))
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data_utils\collate.py in (.0)
82             raise RuntimeError(‘each element in list of batch should be of equal size’)
83         transposed = zip(*batch)
—> 84         return [default_collate(samples) for samples in transposed]
85
86     raise TypeError(default_collate_err_msg_format.format(elem_type))
~.conda\envs\pytorch2\lib\site-packages\torch\utils\data_utils\collate.py in default_collate(batch)
84         return [default_collate(samples) for samples in transposed]
85
—> 86     raise TypeError(default_collate_err_msg_format.format(elem_type))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class ‘imageio.core.util.Array’>