diff --git a/Tasks/daily tasks/Abhinav M Hari/task 2.py b/Tasks/daily tasks/Abhinav M Hari/task 2.py new file mode 100644 index 0000000..88e9ef8 --- /dev/null +++ b/Tasks/daily tasks/Abhinav M Hari/task 2.py @@ -0,0 +1,18 @@ +import torch +import torch.nn as nn + +class Net(nn.Module): + def __init__(self): + super(Net, self). __init__() + self.layer1 = nn.Linear(120, 84) + self.layer2 = nn.Linear(84, 10) + + def forward(self, x): + x = self.layer1(x) + x = torch.sigmoid(self.layer2(x)) + +net = Net() +input = torch.randn(120) +output = net(input) +print(output) +