Views
No views yet
['background', 'tumor'].torch.export (batch dim: dynamic, feature dim: 768).
The exported program wraps MLP + softmax, so the output is probabilities
directly — no model class required at load time.1from huggingface_hub import hf_hub_download
2import json, torch
3
4path = hf_hub_download("RendeiroLab/MetPredict-cell-reclassifier", "model.pt2")
5labels = json.loads(open(hf_hub_download("RendeiroLab/MetPredict-cell-reclassifier", "labels.json")).read())["labels"]
6
7m = torch.export.load(path).module()
8probs = m(torch.randn(N, 768)) # (N, 2), softmaxed
9pred_idx = probs.argmax(-1)
10pred_class = [labels[i] for i in pred_idx.tolist()]model.pt2 — torch.export program (MLP + softmax)labels.json — class index → name map, plus in_dim / n_classes / batchREADME.md — this file