From 0a936bfc5f2e3b5d47ea50d92d252cbb2f8acaf6 Mon Sep 17 00:00:00 2001 From: Chen zhipeng <63433023+confused666@users.noreply.github.com> Date: Sat, 23 Nov 2024 21:20:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dblip=E6=8E=A8=E7=90=86?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20(#1838)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mindnlp/transformers/models/blip/modeling_blip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindnlp/transformers/models/blip/modeling_blip.py b/mindnlp/transformers/models/blip/modeling_blip.py index 4610912e2..9a04dc33a 100644 --- a/mindnlp/transformers/models/blip/modeling_blip.py +++ b/mindnlp/transformers/models/blip/modeling_blip.py @@ -1679,7 +1679,7 @@ def generate( question_attention_mask = ops.ones(*question_embeds.shape[:-1], dtype=mindspore.int64) bos_ids = ops.full( - (question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id + (question_embeds.shape[0], 1), fill_value=self.decoder_start_token_id, dtype=mindspore.int64 ) outputs = self.text_decoder.generate(