mirror of https://github.com/JDAI-CV/fast-reid.git
change cls_target to clas_target
parent
1bd41a79fc
commit
d2ee44d503
|
@ -194,15 +194,15 @@ def pair_batch_collator(batched_inputs):
|
|||
|
||||
images = []
|
||||
targets = []
|
||||
cls_targets = []
|
||||
clas_targets = []
|
||||
for elem in batched_inputs:
|
||||
images.append(elem['img1'])
|
||||
images.append(elem['img2'])
|
||||
targets.append(elem['target'])
|
||||
cls_targets.append(elem['cls_target'])
|
||||
clas_targets.append(elem['clas_target'])
|
||||
|
||||
images = torch.stack(images, dim=0)
|
||||
targets = torch.tensor(targets)
|
||||
cls_targets = torch.tensor(cls_targets)
|
||||
return {'images': images, 'targets': targets, 'cls_targets': cls_targets}
|
||||
cls_targets = torch.tensor(clas_targets)
|
||||
return {'images': images, 'targets': targets, 'clas_targets': clas_targets}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class PairDataset(Dataset):
|
|||
'img1': img1,
|
||||
'img2': img2,
|
||||
'target': label,
|
||||
'cls_target': idx
|
||||
'clas_target': idx
|
||||
}
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue