Browse Source

update finetune

master
行嗔 3 years ago
parent
commit
428599f3e5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/preprocessors/ofa/image_captioning.py

+ 1
- 1
modelscope/preprocessors/ofa/image_captioning.py View File

@@ -62,6 +62,6 @@ class OfaImageCaptioningPreprocessor(OfaBasePreprocessor):
'patch_image': patch_image,
'patch_mask': torch.tensor([True])
}
if self.column_map['text'] in data:
if 'text' in self.column_map and self.column_map['text'] in data:
sample['label'] = data[self.column_map['text']]
return sample

Loading…
Cancel
Save