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 e288361 + 689b702 commit 9a9c4c4Copy full SHA for 9a9c4c4
Tasks/daily tasks/Abhijeet/task2.py
@@ -0,0 +1,26 @@
1
+import torch.nn as nn
2
+
3
+import torch
4
5
+class Network(nn.Module):
6
+ def __init__(self,N_in,N_out):
7
+ super(Network, self).__init__()
8
+ self.input = nn.Linear(N_in, 500)
9
+ self.fc1 = nn.Linear(500, 120)
10
+ self.fc2 = nn.Linear(120, 84)
11
+ self.Output = nn.Linear(84, N_out)
12
+ self.sigmoid = nn.Sigmoid()
13
14
15
+ def forward(self, x):
16
+ x=self.input(x)
17
+ x= self.fc1(x)
18
+ x = self.sigmoid(x)
19
+ x=self.fc2(x)
20
+ x = self.Output(x)
21
+ return x
22
23
24
+net = Network(600,10)
25
+print(net)
26
0 commit comments