In the constructor we instantiate five parameters and assign them as members.
(self)
| 15 | |
| 16 | class DynamicNet(torch.nn.Module): |
| 17 | def __init__(self): |
| 18 | """ |
| 19 | In the constructor we instantiate five parameters and assign them as members. |
| 20 | """ |
| 21 | super().__init__() |
| 22 | self.a = torch.nn.Parameter(torch.randn(())) |
| 23 | self.b = torch.nn.Parameter(torch.randn(())) |
| 24 | self.c = torch.nn.Parameter(torch.randn(())) |
| 25 | self.d = torch.nn.Parameter(torch.randn(())) |
| 26 | self.e = torch.nn.Parameter(torch.randn(())) |
| 27 | |
| 28 | def forward(self, x): |
| 29 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected