revert
Browse files- modeling_bert.py +1 -2
modeling_bert.py
CHANGED
@@ -23,7 +23,6 @@ import torch.nn as nn
|
|
23 |
import torch.nn.functional as F
|
24 |
from einops import rearrange
|
25 |
from transformers import PretrainedConfig
|
26 |
-
from transformers.modeling_utils import PreTrainedModel
|
27 |
from .configuration_bert import JinaBertConfig
|
28 |
from transformers.models.bert.modeling_bert import (
|
29 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
@@ -298,7 +297,7 @@ class BertPreTrainingHeads(nn.Module):
|
|
298 |
return prediction_scores, seq_relationship_score
|
299 |
|
300 |
|
301 |
-
class BertPreTrainedModel(
|
302 |
"""An abstract class to handle weights initialization and
|
303 |
a simple interface for dowloading and loading pretrained models.
|
304 |
"""
|
|
|
23 |
import torch.nn.functional as F
|
24 |
from einops import rearrange
|
25 |
from transformers import PretrainedConfig
|
|
|
26 |
from .configuration_bert import JinaBertConfig
|
27 |
from transformers.models.bert.modeling_bert import (
|
28 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
|
|
297 |
return prediction_scores, seq_relationship_score
|
298 |
|
299 |
|
300 |
+
class BertPreTrainedModel(nn.Module):
|
301 |
"""An abstract class to handle weights initialization and
|
302 |
a simple interface for dowloading and loading pretrained models.
|
303 |
"""
|