Download model.py from SimulaMet-HOST/TACDEC-model: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/SimulaMet-HOST/TACDEC-model/resolve/main/model.py
- Command line
-
hf download hf://SimulaMet-HOST/TACDEC-model/model.py
-
curl -L -o model.py https://huggingface.co/SimulaMet-HOST/TACDEC-model/resolve/main/model.py
502 Bytes
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| class MultiLayerClassifier(nn.Module): | |
| def __init__(self, input_size, num_classes): | |
| super(MultiLayerClassifier, self).__init__() | |
| self.fc1 = nn.Linear(input_size, 128, bias=True) | |
| self.dropout1 = nn.Dropout(0.5) | |
| self.fc2 = nn.Linear(128, num_classes, bias=True) | |
| def forward(self, x): | |
| x = F.relu(self.fc1(x)) | |
| x = self.dropout1(x) | |
| x = self.fc2(x) | |
| return x |