Instructions to use KevinGeertjens/bert-classification-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KevinGeertjens/bert-classification-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="KevinGeertjens/bert-classification-model", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KevinGeertjens/bert-classification-model", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
95e2d7e
1
Parent(s): dcb4bf1
Update bert_classification_model.py
Browse files
bert_classification_model.py
CHANGED
|
@@ -6,8 +6,6 @@ from torch import nn
|
|
| 6 |
|
| 7 |
|
| 8 |
class BertClassificationModel(PreTrainedModel):
|
| 9 |
-
config_class = BertClassificationConfig
|
| 10 |
-
|
| 11 |
def __init__(self, config, num_main_segment=None, num_sub_segment=None):
|
| 12 |
super(BertClassificationModel, self).__init__(config=config)
|
| 13 |
self.num_main_segment = num_main_segment if num_main_segment else config.num_main_segment
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
class BertClassificationModel(PreTrainedModel):
|
|
|
|
|
|
|
| 9 |
def __init__(self, config, num_main_segment=None, num_sub_segment=None):
|
| 10 |
super(BertClassificationModel, self).__init__(config=config)
|
| 11 |
self.num_main_segment = num_main_segment if num_main_segment else config.num_main_segment
|