Skip to content

Commit 95313d7

Browse files
committed
Ran ruff and isort on johan_model.py
1 parent 2a050cf commit 95313d7

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

utils/models/johan_model.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pytest
2-
import torch
31
import torch.nn as nn
42

53
"""
@@ -9,15 +7,16 @@
97
# class NeuronLayer(nn.Module):
108
# def __init__(self, in_features, out_features):
119
# super().__init__()
12-
10+
1311
# self.fc = nn.Linear(in_features, out_features)
1412
# self.relu = nn.ReLU()
15-
13+
1614
# def forward(self, x):
1715
# x = self.fc(x)
1816
# x = self.relu(x)
1917
# return x
20-
18+
19+
2120
class JohanModel(nn.Module):
2221
"""Small MLP model for image classification.
2322
@@ -27,30 +26,30 @@ class JohanModel(nn.Module):
2726
Numer of input features.
2827
num_classes : int
2928
Number of classes in the dataset.
30-
29+
3130
"""
31+
3232
def __init__(self, in_features, num_classes):
3333
super().__init__()
34-
34+
3535
self.fc1 = nn.Linear(in_features, 77)
3636
self.fc2 = nn.Linear(77, 77)
3737
self.fc3 = nn.Linear(77, 77)
3838
self.fc4 = nn.Linear(77, num_classes)
3939
self.softmax = nn.Softmax(dim=1)
4040
self.relu = nn.ReLU()
41-
41+
4242
def forward(self, x):
4343
for layer in [self.fc1, self.fc2, self.fc3, self.fc4]:
4444
x = layer(x)
4545
x = self.relu(x)
4646
x = self.softmax(x)
4747
return x
48-
49-
50-
51-
#TODO
48+
49+
50+
# TODO
5251
# Add your tests here
5352

5453

55-
if __name__=="__main__":
56-
pass # Add your tests here
54+
if __name__ == "__main__":
55+
pass # Add your tests here

0 commit comments

Comments
 (0)