Traceback (most recent call last):
File "../../tools/train.py", line 310, in
main()
File "../../tools/train.py", line 305, in main
train(train_loader, dist_model, optimizer, lr_scheduler, tb_writer)
File "../../tools/train.py", line 168, in train
for idx, data in enumerate(train_loader):
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next
return self._process_data(data)
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
data.reraise()
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise
raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/zyh/anaconda3/envs/siamban/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/zyh/anaconda3/envs/siamban/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/zyh/Code/siamban/siamban/datasets/dataset.py", line 253, in getitem
template_box = self._get_bbox(template_image, template[1])
File "/home/zyh/Code/siamban/siamban/datasets/dataset.py", line 214, in _get_bbox
imh, imw = image.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
你好,请问下我处理完coco数据集后,训练过程如下报错,能帮我看看是什么原因吗? [2021-10-14 12:47:48,068-rk0-distributed.py#131] gradients method is sum
[2021-10-14 12:49:28,001-rk0-train.py#241] Epoch: [1][20/11904] lr: 0.001000
batch_time: 4.661432 (5.191130) data_time: 0.000113 (0.144506)
cls_loss: 0.493952 (0.575097) loc_loss: 0.998612 (0.998525)
total_loss: 1.492564 (1.573622)
[2021-10-14 12:49:28,001-rk0-log_helper.py#105] Progress: 20 / 238080 [0%], Speed: 5.191 s/iter, ETA 14:07:16 (D:H:M)
[2021-10-14 12:51:10,277-rk0-train.py#241] Epoch: [1][40/11904] lr: 0.001000 batch_time: 4.780557 (5.053296) data_time: 0.000125 (0.072318) cls_loss: 0.426808 (0.500939) loc_loss: 0.998599 (0.998491) total_loss: 1.425407 (1.499430) [2021-10-14 12:51:10,278-rk0-log_helper.py#105] Progress: 40 / 238080 [0%], Speed: 5.053 s/iter, ETA 13:22:08 (D:H:M)
Traceback (most recent call last): File "../../tools/train.py", line 310, in
main()
File "../../tools/train.py", line 305, in main
train(train_loader, dist_model, optimizer, lr_scheduler, tb_writer)
File "../../tools/train.py", line 168, in train
for idx, data in enumerate(train_loader):
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in next
return self._process_data(data)
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
data.reraise()
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/_utils.py", line 385, in reraise
raise self.exc_type(msg)
AttributeError: Caught AttributeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/zyh/anaconda3/envs/siamban/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "/home/zyh/anaconda3/envs/siamban/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/zyh/anaconda3/envs/siamban/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/zyh/Code/siamban/siamban/datasets/dataset.py", line 253, in getitem
template_box = self._get_bbox(template_image, template[1])
File "/home/zyh/Code/siamban/siamban/datasets/dataset.py", line 214, in _get_bbox
imh, imw = image.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'