Skip to content

Commit 37b1409

Browse files
authored
Merge pull request #82 from Thelonenlyhobbist/daily_task
task2
2 parents f25b924 + 77cbfce commit 37b1409

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import torch
2+
import torch.nn as nn
3+
4+
class Net(nn.Module):
5+
def __init__(self):
6+
super(Net, self). __init__()
7+
self.layer1 = nn.Linear(120, 84)
8+
self.layer2 = nn.Linear(84, 10)
9+
10+
def forward(self, x):
11+
x = self.layer1(x)
12+
x = torch.sigmoid(self.layer2(x))
13+
14+
net = Net()
15+
input = torch.randn(120)
16+
output = net(input)
17+
print(output)
18+

0 commit comments

Comments
 (0)