sjrhuschlee
commited on
Commit
•
0fbf44e
1
Parent(s):
039280c
Update modeling_t5qa.py
Browse files- modeling_t5qa.py +3 -0
modeling_t5qa.py
CHANGED
@@ -6,6 +6,7 @@ import torch
|
|
6 |
from torch import nn
|
7 |
from torch.nn import CrossEntropyLoss
|
8 |
|
|
|
9 |
from transformers.modeling_outputs import (
|
10 |
BaseModelOutput,
|
11 |
Seq2SeqQuestionAnsweringModelOutput,
|
@@ -199,3 +200,5 @@ class T5ForQuestionAnswering(T5PreTrainedModel):
|
|
199 |
encoder_attentions=encoder_outputs.attentions,
|
200 |
)
|
201 |
|
|
|
|
|
|
6 |
from torch import nn
|
7 |
from torch.nn import CrossEntropyLoss
|
8 |
|
9 |
+
from transformers import AutoModelForQuestionAnswering
|
10 |
from transformers.modeling_outputs import (
|
11 |
BaseModelOutput,
|
12 |
Seq2SeqQuestionAnsweringModelOutput,
|
|
|
200 |
encoder_attentions=encoder_outputs.attentions,
|
201 |
)
|
202 |
|
203 |
+
|
204 |
+
AutoModelForQuestionAnswering.register(T5Config, T5ForQuestionAnswering)
|