|
| network |
| a dense model with one hidden layer
|
|
My dense neural network
Definition at line 45 of file torch.py.
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
number_of_features |
|
) |
| |
Init the network
param: number_of_features number of input variables
Definition at line 50 of file torch.py.
50 def __init__(self, number_of_features):
51 """
52 Init the network
53 param: number_of_features number of input variables
54 """
55 super(myModel, self).__init__()
56
57
58 self.network = torch.nn.Sequential(
59 torch.nn.Linear(number_of_features, 128),
60 torch.nn.ReLU(),
61 torch.nn.Linear(128, 128),
62 torch.nn.ReLU(),
63 torch.nn.Linear(128, 1),
64 torch.nn.Sigmoid(),
65 )
66
◆ forward()
Run the network
Definition at line 67 of file torch.py.
67 def forward(self, x):
68 """
69 Run the network
70 """
71 prob = self.network(x)
72 return prob
73
74
◆ network
a dense model with one hidden layer
Definition at line 58 of file torch.py.
The documentation for this class was generated from the following file:
- mva/scripts/basf2_mva_python_interface/torch.py