I am currently trying to train the Resnet-18 model with the interactive regression notebook with a dataset of 1400 images, when I launch a training I get the following error:
AttributeError Traceback (most recent call last)
in train_eval(is_training)
35 error_count = 0.0
---> 36 for images, category_idx, xy in iter(train_loader):
37 # send data to device
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __next__(self)
362 def __next__(self):
--> 363 data = self._next_data()
364 self._num_yielded += 1
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in _next_data(self)
402 index = self._next_index() # may raise StopIteration
--> 403 data = self._dataset_fetcher.fetch(index) # may raise StopIteration
404 if self._pin_memory:
/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py in (.0)
43 if self.auto_collation:
---> 44 data = [self.dataset[idx] for idx in possibly_batched_index]
45 else:
~/jetracer/notebooks/xy_dataset.py in __getitem__(self, idx)
26 image = cv2.imread(ann['image_path'], cv2.IMREAD_COLOR)
---> 27 image = PIL.Image.fromarray(image)
28 width = image.width
/usr/lib/python3/dist-packages/PIL/Image.py in fromarray(obj, mode)
2420 """
-> 2421 arr = obj.__array_interface__
2422 shape = arr['shape']
AttributeError: 'NoneType' object has no attribute '__array_interface__'
During handling of the above exception, another exception occurred:
NameError Traceback (most recent call last)
in (c)
78 state_widget.value = 'live'
79
---> 80 train_button.on_click(lambda c: train_eval(is_training=True))
81 eval_button.on_click(lambda c: train_eval(is_training=False))
82
in train_eval(is_training)
70 else:
71 break
---> 72 except e:
73 pass
74 model = model.eval()
NameError: name 'e' is not defined
Has anyone had this error before or can anyone help me, please ?
Thanks,
Wilson
Hello team,
I am currently trying to train the Resnet-18 model with the interactive regression notebook with a dataset of 1400 images, when I launch a training I get the following error:
AttributeError Traceback (most recent call last)