salesforce / ALBEF

Code for ALBEF: a new vision-language pre-training method
BSD 3-Clause "New" or "Revised" License
1.45k stars 193 forks source link

NLVR2 Pretrain #115

Open lonestar234028 opened 1 year ago

lonestar234028 commented 1 year ago

Hi expert: As we know, there is a text alignment pretrain task for NLVR2, which is a one pass, three class task. I have read the code, but I don't get why it can be writen like this, can you teach me and explain? image

LiJunnan1992 commented 1 year ago

This part of code randomly generates the inputs and corresponding labels for the text-assignment task.