Downloads · 30 days
2
9% of all-time downloads
fansen/BERT-6L-CSL-Sepsis-Diag
BERT-6L-CSL-Sepsis-Diag is a machine learning model from fansen. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Sepsis in-hospital mortality prediction from ICD diagnosis text.
Downloads · 30 days
2
9% of all-time downloads
All-time downloads
22
Public
Repo size
50.6 MB
Likes
0
Public
Click a slice to open those files.
.bin50.6 MB · 98%
From the Hugging Face model README
Sepsis in-hospital mortality prediction from ICD diagnosis text.
import torch
from src.bert_classifier import BertClassifier
# Load checkpoint
ckpt = torch.load('pytorch_model.bin', map_location='cpu')
model = BertClassifier(
vocab_size=4805,
encoder_num=1,
)
model.load_state_dict(ckpt['model_state_dict'])
model.eval()
# Inference
input_ids = tokenizer(text, return_tensors='pt')['input_ids']
logits = model(input_ids)
pred = torch.argmax(logits, dim=-1).item()
Built with sepsis-diagnosis.