Why does the error like this happen?
cnr0724 opened this issue · 0 comments
cnr0724 commented
/home/dnaplus/Downloads/ssd.pytorch/ssd.py:34: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
self.priors = Variable(self.priorbox.forward(), volatile=True)
Loading base network...
Initializing weights...
train.py:214: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
init.xavier_uniform(param)
Loading the dataset...
Training SSD on: VOC0712
Using the specified args:
Namespace(basenet='vgg16_reducedfc.pth', batch_size=8, cuda=True, dataset='VOC', dataset_root='/home/dnaplus/Downloads/ssd.pytorch/data/VOCdevkit/', gamma=0.1, lr=0.001, momentum=0.9, num_workers=1, resume=None, save_folder='weights/', start_iter=0, visdom=False, weight_decay=0.0005)
/home/dnaplus/Downloads/ssd.pytorch/utils/augmentations.py:238: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
mode = random.choice(self.sample_options)
train.py:169: UserWarning: volatile was removed and now has no effect. Use `with torch.no_grad():` instead.
targets = [Variable(ann.cuda(), volatile=True) for ann in targets]
/home/dnaplus/.local/lib/python3.6/site-packages/torch/nn/_reduction.py:42: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead.
warnings.warn(warning.format(ret))
timer: 23.5251 sec.
iter 0 || Loss: 35.8328 || Traceback (most recent call last):
File "train.py", line 255, in <module>
train()
File "train.py", line 165, in train
images, targets = next(batch_iterator)
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 517, in __next__
data = self._next_data()
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/_utils.py", line 429, in reraise
raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/dnaplus/.local/lib/python3.6/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/dnaplus/Downloads/ssd.pytorch/data/voc0712.py", line 106, in __getitem__
im, gt, h, w = self.pull_item(index)
File "/home/dnaplus/Downloads/ssd.pytorch/data/voc0712.py", line 121, in pull_item
target = self.target_transform(target, width, height)
File "/home/dnaplus/Downloads/ssd.pytorch/data/voc0712.py", line 55, in __call__
name = obj.find('name').text.lower().strip()
AttributeError: 'NoneType' object has no attribute 'text'