sergiotasconmorales / consistency_vqa

Repository of paper Consistency-preserving Visual Question Answering in Medical Imaging (MICCAI2022)
Apache License 2.0
21 stars 3 forks source link

compute_loss_term_nlp function #1

Open Tzx11 opened 3 months ago

Tzx11 commented 3 months ago

Thank you for your work

As the code appears: def compute_loss_term(self, non_avg_ce, flag, device):

Depending on function, compute loss term accordingly

    if self.fcn == 'fcn2' or self.fcn == 'fcn8' or self.fcn == 'fcn9':
        return self.loss_term_fcn(non_avg_ce, flag, device, gamma=self.gamma, exp=self.exp)
    elif self.fcn == 'fcn4':
        return torch.tensor(0) # return 0 (no additional loss term)
    else:
        raise ValueError('Unknown function. If youre using the NLP model, use compute_loss_term_nlp instead of compute_loss_term')

Where is the compute_loss_term_nlp function? Looking forward to your reply

sergiotasconmorales commented 3 months ago

Hi, thank you for your interest in our work. That error message was only considered during experimental development but is not part of the final version. As you can see in models.py, there is no NLP model. Sorry for any misunderstanding.