Update minigpt_base.py

This commit is contained in:
Xiang Li 2023-10-27 14:11:11 +03:00 committed by GitHub
parent f91ef5f724
commit 9d8335c1f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ from minigpt4.common.registry import registry
from minigpt4.models.base_model import BaseModel
from transformers import StoppingCriteria, StoppingCriteriaList
from minigpt4.conversation.conversation import StoppingCriteriaSub
class MiniGPTBase(BaseModel):
"""
@ -399,4 +399,4 @@ class MiniGPTBase(BaseModel):
for i in range(all_losses.shape[0]):
all_losses[i, num_cand[i]:] = 9999
output_class_ranks = torch.argsort(all_losses, dim=-1)
return output_class_ranks.tolist()
return output_class_ranks.tolist()