Traceback (most recent call last):
File "train.py", line 660, in
train() # train normally
File "train.py", line 452, in train
loss, loss_items = compute_loss_no_upsample(pred, reid_feat_out, targets, track_ids, model)
File "/home/--/MCMOT_YOLOV4_dev/utils/utils.py", line 416, in compute_loss_no_upsample
id_map_w, id_map_h = reid_feat_out[i].shape[3], reid_feat_out[i].shape[2] # 3 feature map layers
AttributeError: 'list' object has no attribute 'shape'
把改行使用np.array转成array会出下面的错误
id_map_w, id_map_h = np.array(reid_feat_out)[i].shape[3], np.array(reid_feat_out)[i].shape[2] # 3 feature map layers
AttributeError: 'int' object has no attribute 'array'
使用torch.tensor转换的时候会出现:
id_map_w, id_map_h = torch.tensor(reid_feat_out)[i].shape[3], torch.tensor(reid_feat_out)[i].shape[2] # 3 feature map layers
IndexError: tuple index out of range
Traceback (most recent call last): File "train.py", line 660, in
train() # train normally
File "train.py", line 452, in train
loss, loss_items = compute_loss_no_upsample(pred, reid_feat_out, targets, track_ids, model)
File "/home/--/MCMOT_YOLOV4_dev/utils/utils.py", line 416, in compute_loss_no_upsample
id_map_w, id_map_h = reid_feat_out[i].shape[3], reid_feat_out[i].shape[2] # 3 feature map layers
AttributeError: 'list' object has no attribute 'shape'
把改行使用np.array转成array会出下面的错误 id_map_w, id_map_h = np.array(reid_feat_out)[i].shape[3], np.array(reid_feat_out)[i].shape[2] # 3 feature map layers AttributeError: 'int' object has no attribute 'array'
使用torch.tensor转换的时候会出现: id_map_w, id_map_h = torch.tensor(reid_feat_out)[i].shape[3], torch.tensor(reid_feat_out)[i].shape[2] # 3 feature map layers IndexError: tuple index out of range
我发现在models.py中,这几个out中的元素都是 [] 空的: out.append(x if self.routs[i] else []) if verbose: print('%g/%g %s -' % (i, len(self.module_list), name), list(x.shape), str) str = ''
Get 3 feature map layers for reid feature vector extraction
@CaptainEven 请问该变量的问题如何解决?请问空的元素是问题的原因吗?