<PIL.PngImagePlugin.PngImageFile image mode=L size=536x382 at 0x7F4ECC189290>
<PIL.PngImagePlugin.PngImageFile image mode=L size=530x410 at 0x7F4ECC18D7D0>
<PIL.PngImagePlugin.PngImageFile image mode=L size=544x425 at 0x7F4ECC188ED0>
<PIL.PngImagePlugin.PngImageFile image mode=L size=371x341 at 0x7F4ECC189B50>
<PIL.PngImagePlugin.PngImageFile image mode=L size=459x420 at 0x7F4F4424A3D0>
<PIL.PngImagePlugin.PngImageFile image mode=L size=500x370 at 0x7F4F44246E50>
<PIL.PngImagePlugin.PngImageFile image mode=L size=375x320 at 0x7F4F44248750>
<PIL.PngImagePlugin.PngImageFile image mode=L size=460x344 at 0x7F4F44247AD0>
<PIL.PngImagePlugin.PngImageFile image mode=L size=388x345 at 0x7F4F4424A490>
TypeError                                 Traceback (most recent call last)
 in 
1 if name == “main”:
----> 2     main()
 in main()
53     for epoch in range(num_epochs):
54         # train for one epoch, printing every 10 iterations
—> 55         train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10)
56
57         # update the learning rate
~/anaconda3/A_Projects/engine.py in train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq)
24         lr_scheduler = utils.warmup_lr_scheduler(optimizer, warmup_iters, warmup_factor)
25
—> 26     for images, targets in metric_logger.log_every(data_loader, print_freq, header):
27         images = list(image.to(device) for image in images)
28         targets = [{k: v.to(device) for k, v in t.items()} for t in targets]
~/anaconda3/A_Projects/utils.py in log_every(self, iterable, print_freq, header)
207             ])
208         MB = 1024.0 * 1024.0
–> 209         for obj in iterable:
210             data_time.update(time.time() - end)
211             yield obj
~/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py in next(self)
343
344     def next(self):
–> 345         data = self._next_data()
346         self._num_yielded += 1
347         if self._dataset_kind == _DatasetKind.Iterable and \
~/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py in _next_data(self)
854             else:
855                 del self._task_info[idx]
–> 856                 return self._process_data(data)
857
858     def _try_put_index(self):
~/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py in _process_data(self, data)
879         self._try_put_index()
880         if isinstance(data, ExceptionWrapper):
–> 881             data.reraise()
882         return data
883
~/anaconda3/lib/python3.7/site-packages/torch/_utils.py in reraise(self)
392             # (https://bugs.python.org/issue2651), so we work around it.
393             msg = KeyErrorMessage(msg)
–> 394         raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py”, line 178, in _worker_loop
data = fetcher.fetch(index)
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py”, line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py”, line 44, in 
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataset.py”, line 257, in getitem
return self.dataset[self.indices[idx]]
File “”, line 68, in getitem
target=self.transforms(target)
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py”, line 70, in call
img = t(img)
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py”, line 101, in call
return F.to_tensor(pic)
File “/home/chandrasekar/anaconda3/lib/python3.7/site-packages/torchvision/transforms/functional.py”, line 55, in to_tensor
raise TypeError(‘pic should be PIL Image or ndarray. Got {}’.format(type(pic)))
TypeError: pic should be PIL Image or ndarray. Got <class ‘dict’>