Download ner_model.py from Deepnar/ice-v2-microner: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/Deepnar/ice-v2-microner/resolve/main/ner_model.py
- Command line
-
hf download hf://Deepnar/ice-v2-microner/ner_model.py
-
curl -L -o ner_model.py https://huggingface.co/Deepnar/ice-v2-microner/resolve/main/ner_model.py
491 Bytes
| """Micro NER model: 384‑dim input → 3‑class output with hidden layers.""" | |
| import torch | |
| import torch.nn as nn | |
| class MicroNER(nn.Module): | |
| def __init__(self): | |
| super().__init__() | |
| self.net = nn.Sequential( | |
| nn.Linear(384, 128), | |
| nn.ReLU(), | |
| nn.Dropout(0.2), | |
| nn.Linear(128, 64), | |
| nn.ReLU(), | |
| nn.Dropout(0.2), | |
| nn.Linear(64, 3), | |
| ) | |
| def forward(self, x): | |
| return self.net(x) |