mirror of https://github.com/JDAI-CV/DCL.git
Update dataset_DCL.py
parent
3b5b5e95ac
commit
d9ddacda59
|
@ -162,10 +162,10 @@ def collate_fn4backbone(batch):
|
|||
img_name = []
|
||||
for sample in batch:
|
||||
imgs.append(sample[0])
|
||||
if len(sample) == 5:
|
||||
label.append(sample[1])
|
||||
else:
|
||||
if len(sample) == 7:
|
||||
label.append(sample[2])
|
||||
else:
|
||||
label.append(sample[1])
|
||||
img_name.append(sample[-1])
|
||||
return torch.stack(imgs, 0), label, img_name
|
||||
|
||||
|
|
Loading…
Reference in New Issue