Download LLMatic/initial_net.py from Sarah-3bas/llmatic: direct link, hf CLI and curl.
- Browser
- Download file 371 Bytes
-
https://huggingface.co/Sarah-3bas/llmatic/resolve/main/LLMatic/initial_net.py
- Command line
-
hf download hf://Sarah-3bas/llmatic/LLMatic/initial_net.py
-
curl -L -o initial_net.py https://huggingface.co/Sarah-3bas/llmatic/resolve/main/LLMatic/initial_net.py
371 Bytes
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| class Net(nn.Module): | |
| def __init__(self): | |
| super().__init__() | |
| self.conv1 = nn.Conv2d(3, 1, 1) | |
| self.fc1 = nn.Linear(1024, 10) | |
| def forward(self, x): | |
| x = F.relu(self.conv1(x)) | |
| x = torch.flatten(x, 1) | |
| x = F.relu(self.fc1(x)) | |
| return x |