Spaces:
Sleeping
Sleeping
Delete model.py
Browse files
model.py
DELETED
|
@@ -1,20 +0,0 @@
|
|
| 1 |
-
class CNN(nn.Module):
|
| 2 |
-
def __init__(self):
|
| 3 |
-
super(CNN, self).__init__()
|
| 4 |
-
self.conv1 = nn.Conv2d(1, 32, kernel_size=3)
|
| 5 |
-
self.pool1 = nn.MaxPool2d(2)
|
| 6 |
-
self.conv2 = nn.Conv2d(32, 64, kernel_size=3)
|
| 7 |
-
self.pool2 = nn.MaxPool2d(2)
|
| 8 |
-
self.flatten = nn.Flatten()
|
| 9 |
-
self.fc1 = nn.Linear(64 * 5 * 5, 64)
|
| 10 |
-
self.fc2 = nn.Linear(64, 10)
|
| 11 |
-
|
| 12 |
-
def forward(self, x):
|
| 13 |
-
x = F.relu(self.conv1(x))
|
| 14 |
-
x = self.pool1(x)
|
| 15 |
-
x = F.relu(self.conv2(x))
|
| 16 |
-
x = self.pool2(x)
|
| 17 |
-
x = self.flatten(x)
|
| 18 |
-
x = F.relu(self.fc1(x))
|
| 19 |
-
x = self.fc2(x)
|
| 20 |
-
return x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|