Update modeling_bert2d.py
Browse files- modeling_bert2d.py +6 -6
modeling_bert2d.py
CHANGED
|
@@ -27,9 +27,9 @@ from packaging import version
|
|
| 27 |
from torch import nn
|
| 28 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 29 |
|
| 30 |
-
from
|
| 31 |
-
from
|
| 32 |
-
from
|
| 33 |
BaseModelOutputWithPastAndCrossAttentions,
|
| 34 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
| 35 |
CausalLMOutputWithCrossAttentions,
|
|
@@ -40,9 +40,9 @@ from ...modeling_outputs import (
|
|
| 40 |
SequenceClassifierOutput,
|
| 41 |
TokenClassifierOutput,
|
| 42 |
)
|
| 43 |
-
from
|
| 44 |
-
from
|
| 45 |
-
from
|
| 46 |
from .configuration_bert2d import Bert2DConfig
|
| 47 |
|
| 48 |
|
|
|
|
| 27 |
from torch import nn
|
| 28 |
from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
| 29 |
|
| 30 |
+
from transformers.activations import ACT2FN
|
| 31 |
+
from transformers.generation import GenerationMixin
|
| 32 |
+
from transformers.modeling_outputs import (
|
| 33 |
BaseModelOutputWithPastAndCrossAttentions,
|
| 34 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
| 35 |
CausalLMOutputWithCrossAttentions,
|
|
|
|
| 40 |
SequenceClassifierOutput,
|
| 41 |
TokenClassifierOutput,
|
| 42 |
)
|
| 43 |
+
from transformers.modeling_utils import PreTrainedModel
|
| 44 |
+
from transformers.pytorch_utils import apply_chunking_to_forward, find_pruneable_heads_and_indices, prune_linear_layer
|
| 45 |
+
from transformers.utils import ModelOutput, auto_docstring, get_torch_version, logging
|
| 46 |
from .configuration_bert2d import Bert2DConfig
|
| 47 |
|
| 48 |
|