We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f25b924 + 77cbfce commit 37b1409Copy full SHA for 37b1409
Tasks/daily tasks/Abhinav M Hari/task 2.py
@@ -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