Hi while using transforms for an image dataset like this
 train_transform = transforms.Compose([
                                          transforms.Resize((205, 205)), 
                                          transforms.RandomVerticalFlip(p=0.5), 
                                          transforms.RandomCrop((200, 200)),
                                          transforms.ToTensor()])

I got this entire error
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-7a9e35561311> in <module>
     47    # print(PCP(sample1.unsqueeze(0), sample2.unsqueeze(0)))
     48 
---> 49     plotSamples(LSP_dataset)
     50 
     51     plt.tight_layout()

<ipython-input-3-2b3f96239780> in plotSamples(dataset)
      3     for i in range(25):
      4         ax = axes[i // 5, i % 5]
----> 5         sample = dataset[i]
      6         image = sample['image']
      7         joints = sample['joints']

<ipython-input-1-ae4f8f0687a1> in __getitem__(self, idx)
     68         sample = {'image': image, 'joints': joints}
     69         if self.transform:
---> 70             sample = self.transform(sample)
     71 
     72         return sample

~\anaconda3\lib\site-packages\torchvision\transforms\transforms.py in __call__(self, img)
     58     def __call__(self, img):
     59         for t in self.transforms:
---> 60             img = t(img)
     61         return img
     62 

~\anaconda3\lib\site-packages\torch\nn\modules\module.py in _call_impl(self, *input, **kwargs)
    887             result = self._slow_forward(*input, **kwargs)
    888         else:
--> 889             result = self.forward(*input, **kwargs)
    890         for hook in itertools.chain(
    891                 _global_forward_hooks.values(),

~\anaconda3\lib\site-packages\torchvision\transforms\transforms.py in forward(self, img)
    271             PIL Image or Tensor: Rescaled image.
    272         """
--> 273         return F.resize(img, self.size, self.interpolation)
    274 
    275     def __repr__(self):

~\anaconda3\lib\site-packages\torchvision\transforms\functional.py in resize(img, size, interpolation)
    373     if not isinstance(img, torch.Tensor):
    374         pil_interpolation = pil_modes_mapping[interpolation]
--> 375         return F_pil.resize(img, size=size, interpolation=pil_interpolation)
    376 
    377     return F_t.resize(img, size=size, interpolation=interpolation.value)

~\anaconda3\lib\site-packages\torchvision\transforms\functional_pil.py in resize(img, size, interpolation)
    207 def resize(img, size, interpolation=Image.BILINEAR):
    208     if not _is_pil_image(img):
--> 209         raise TypeError('img should be PIL Image. Got {}'.format(type(img)))
    210     if not (isinstance(size, int) or (isinstance(size, Sequence) and len(size) in (1, 2))):
    211         raise TypeError('Got inappropriate size arg: {}'.format(size))
------------------------------------------------------------------------------------------------
TypeError: img should be PIL Image. Got <class 'dict'>

not sure how to fix it.Any suggestions welcome