Feature Extraction
Transformers
Safetensors
protenrich
proteins
bioinformatics
drug-discovery
custom_code
Instructions to use SaeedLab/ProtEnrich-ProtBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SaeedLab/ProtEnrich-ProtBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="SaeedLab/ProtEnrich-ProtBERT", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SaeedLab/ProtEnrich-ProtBERT", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
ef8f564
1
Parent(s): c718a35
update
Browse files- modeling_protenrich.py +1 -1
modeling_protenrich.py
CHANGED
|
@@ -101,7 +101,7 @@ class ProtEnrichForSequenceClassification(PreTrainedModel):
|
|
| 101 |
self.protenrich = ProtEnrichModel(config)
|
| 102 |
self.classifier = nn.Linear(config.embed_dim, config.num_labels)
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
def forward(self, seq: torch.Tensor, labels: Optional[torch.Tensor] = None, return_dict: Optional[bool] = None):
|
| 107 |
|
|
|
|
| 101 |
self.protenrich = ProtEnrichModel(config)
|
| 102 |
self.classifier = nn.Linear(config.embed_dim, config.num_labels)
|
| 103 |
|
| 104 |
+
self.post_init()
|
| 105 |
|
| 106 |
def forward(self, seq: torch.Tensor, labels: Optional[torch.Tensor] = None, return_dict: Optional[bool] = None):
|
| 107 |
|