cognitivess commited on
Commit
763be71
1 Parent(s): 333b35e

Update cognitivess_model/modeling_cognitivess.py

Browse files
cognitivess_model/modeling_cognitivess.py CHANGED
@@ -237,9 +237,9 @@ class CognitivessForQuestionAnswering(LlamaPreTrainedModel):
237
  end_loss = loss_fct(end_logits, end_positions)
238
  loss = (start_loss + end_loss) / 2
239
 
240
- if not return_dict:
241
- output = (start_logits, end_logits) + outputs[1:]
242
- return ((loss,) + output) if loss is not None else output
243
 
244
  return QuestionAnsweringModelOutput(
245
  loss=loss,
 
237
  end_loss = loss_fct(end_logits, end_positions)
238
  loss = (start_loss + end_loss) / 2
239
 
240
+ if not return_dict:
241
+ output = (start_logits, end_logits) + outputs[1:]
242
+ return ((loss,) + output) if loss is not None else output
243
 
244
  return QuestionAnsweringModelOutput(
245
  loss=loss,