-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from understandable-machine-intelligence-lab/f…
…ixes Fixes
- Loading branch information
Showing
12 changed files
with
118 additions
and
3,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .helpers import * | ||
from .metrics import * | ||
from .methods import * | ||
from .methods import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
from .similar_func import * | ||
from .explanation_func import * | ||
from .warn_func import * | ||
from .models import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import torch | ||
|
||
|
||
class LeNet(torch.nn.Module): | ||
"""Network architecture from: https://github.com/ChawDoe/LeNet5-MNIST-PyTorch.""" | ||
def __init__(self): | ||
super().__init__() | ||
self.conv_1 = torch.nn.Conv2d(1, 6, 5) | ||
self.pool_1 = torch.nn.MaxPool2d(2, 2) | ||
self.relu_1 = torch.nn.ReLU() | ||
self.conv_2 = torch.nn.Conv2d(6, 16, 5) | ||
self.pool_2 = torch.nn.MaxPool2d(2, 2) | ||
self.relu_2 = torch.nn.ReLU() | ||
self.fc_1 = torch.nn.Linear(256, 120) | ||
self.relu_3 = torch.nn.ReLU() | ||
self.fc_2 = torch.nn.Linear(120, 84) | ||
self.relu_4 = torch.nn.ReLU() | ||
self.fc_3 = torch.nn.Linear(84, 10) | ||
|
||
def forward(self, x): | ||
x = self.pool_1(self.relu_1(self.conv_1(x))) | ||
x = self.pool_2(self.relu_2(self.conv_2(x))) | ||
x = x.view(x.shape[0], -1) | ||
x = self.relu_3(self.fc_1(x)) | ||
x = self.relu_4(self.fc_2(x)) | ||
x = self.fc_3(x) | ||
return x | ||
|
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.