Download model.py from Skskskd/ia-do-zero: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/Skskskd/ia-do-zero/resolve/main/model.py
- Command line
-
hf download hf://Skskskd/ia-do-zero/model.py
-
curl -L -o model.py https://huggingface.co/Skskskd/ia-do-zero/resolve/main/model.py
408 Bytes
| import torch | |
| import torch.nn as nn | |
| class MinhaIA(nn.Module): | |
| def __init__(self): | |
| super(MinhaIA, self).__init__() | |
| self.flatten = nn.Flatten() | |
| self.fc1 = nn.Linear(28 * 28, 128) | |
| self.fc2 = nn.Linear(128, 10) | |
| self.relu = nn.ReLU() | |
| def forward(self, x): | |
| x = self.flatten(x) | |
| x = self.relu(self.fc1(x)) | |
| x = self.fc2(x) | |
| return x | |