Text Classification
Transformers
Safetensors
English
emcoder
emotion-recognition
bayesian-deep-learning
mc-dropout
uncertainty-quantification
multi-label-classification
custom_code
Eval Results (legacy)
Instructions to use yezdata/EmCoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yezdata/EmCoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="yezdata/EmCoder", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("yezdata/EmCoder", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
update V1.5 README
Browse files
README.md
CHANGED
|
@@ -89,7 +89,8 @@ inputs = tokenizer("I am so happy you are here!", return_tensors="pt")
|
|
| 89 |
|
| 90 |
model.eval()
|
| 91 |
with torch.no_grad():
|
| 92 |
-
|
|
|
|
| 93 |
|
| 94 |
# Bayesian Post-processing
|
| 95 |
all_probs = torch.sigmoid(mc_logits) # (n_samples, B, 28)
|
|
|
|
| 89 |
|
| 90 |
model.eval()
|
| 91 |
with torch.no_grad():
|
| 92 |
+
# Automatically keeps Dropout active, even when in model.eval
|
| 93 |
+
mc_logits = model.mc_forward(inputs['input_ids'], inputs['attention_mask'], n_samples=N_SAMPLES, max_batch_size=MAX_BATCH_SIZE)
|
| 94 |
|
| 95 |
# Bayesian Post-processing
|
| 96 |
all_probs = torch.sigmoid(mc_logits) # (n_samples, B, 28)
|