UniControl icon indicating copy to clipboard operation
UniControl copied to clipboard

``batch['text']`` adds ``[self.mapping_task[task_name]]`` twice

Open Lighten001 opened this issue 1 year ago • 1 comments

function log_images will call get_input (which is the second time be called) on train batch end

z, c = self.get_input(batch, self.first_stage_key, bs=N)

so batch['text'] will add [self.mapping_task[task_name]] twice

batch['txt'] = batch['txt'] + [self.mapping_task[task_name]]

the c_task should be c_all[BS:BS+1,:1,:] to avoid the two same task prompt

Lighten001 avatar Apr 22 '24 14:04 Lighten001

Thanks for the contribution! Before we can merge this, we need @lighten001 to sign the Salesforce Inc. Contributor License Agreement.

salesforce-cla[bot] avatar Apr 22 '24 14:04 salesforce-cla[bot]