Spaces:
Running
Running
ra1425
commited on
Commit
·
7b10a4d
1
Parent(s):
83d4d7f
Fixed fc1 parameter
Browse files- models/modelOne.py +2 -1
models/modelOne.py
CHANGED
|
@@ -13,7 +13,7 @@ class modelOne(nn.Module) :
|
|
| 13 |
self.conv2 = nn.Conv2d(6, 16, 5, padding=2)
|
| 14 |
self.batchNorm2 = nn.BatchNorm2d(16)
|
| 15 |
|
| 16 |
-
self.fc1 = nn.Linear(
|
| 17 |
self.dropout = nn.Dropout(0.5)
|
| 18 |
|
| 19 |
self.fc2 = nn.Linear(512, 84)
|
|
@@ -23,6 +23,7 @@ class modelOne(nn.Module) :
|
|
| 23 |
x = self.pool(F.relu(self.batchNorm1(self.conv1(x))))
|
| 24 |
x = self.pool(F.relu(self.batchNorm2(self.conv2(x))))
|
| 25 |
x = torch.flatten(x, 1)
|
|
|
|
| 26 |
x = self.dropout(x)
|
| 27 |
x = F.relu(self.fc1(x))
|
| 28 |
x = F.relu(self.fc2(x))
|
|
|
|
| 13 |
self.conv2 = nn.Conv2d(6, 16, 5, padding=2)
|
| 14 |
self.batchNorm2 = nn.BatchNorm2d(16)
|
| 15 |
|
| 16 |
+
self.fc1 = nn.Linear(63504, 512)
|
| 17 |
self.dropout = nn.Dropout(0.5)
|
| 18 |
|
| 19 |
self.fc2 = nn.Linear(512, 84)
|
|
|
|
| 23 |
x = self.pool(F.relu(self.batchNorm1(self.conv1(x))))
|
| 24 |
x = self.pool(F.relu(self.batchNorm2(self.conv2(x))))
|
| 25 |
x = torch.flatten(x, 1)
|
| 26 |
+
print("Flattened size:", x.shape[1])
|
| 27 |
x = self.dropout(x)
|
| 28 |
x = F.relu(self.fc1(x))
|
| 29 |
x = F.relu(self.fc2(x))
|