Download model.py from ljt019/cat_dog_classifier_cnn: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/ljt019/cat_dog_classifier_cnn/resolve/main/model.py
- Command line
-
hf download hf://ljt019/cat_dog_classifier_cnn/model.py
-
curl -L -o model.py https://huggingface.co/ljt019/cat_dog_classifier_cnn/resolve/main/model.py
327 Bytes
| import torch.nn as nn | |
| import torch | |
| class SimpleModel(nn.Module): | |
| def __init__(self): | |
| super(SimpleModel, self).__init__() | |
| self.fc1 = nn.Linear(784, 128) | |
| self.fc2 = nn.Linear(128, 2) | |
| def forward(self, x): | |
| x = torch.relu(self.fc1(x)) | |
| x = self.fc2(x) | |
| return x | |