Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training Error #152

Open
wilson030402 opened this issue Jul 30, 2024 · 0 comments
Open

Training Error #152

wilson030402 opened this issue Jul 30, 2024 · 0 comments

Comments

@wilson030402
Copy link

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)
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant