(self, dataset_ref, h1_dim=128, h2_dim=64)
| 76 | 3-Layer classifier for ETH/BTC dataset. |
| 77 | """ |
| 78 | def __init__(self, dataset_ref, h1_dim=128, h2_dim=64): |
| 79 | |
| 80 | super(Simple_3_Layer_Classifier, self).__init__() |
| 81 | |
| 82 | # --- Save the dims --- |
| 83 | self.x_dim = dataset_ref.get_input_dim() |
| 84 | self.out_dim = dataset_ref.get_output_dim() |
| 85 | self.h1_dim, self.h2_dim = h1_dim, h2_dim |
| 86 | |
| 87 | # --- Layers --- |
| 88 | self.linear_1 = nn.Linear(in_features=self.x_dim, out_features=self.h1_dim) |
| 89 | self.activ_1 = nn.ReLU() |
| 90 | self.linear_2 = nn.Linear(in_features=self.h1_dim, out_features=self.h2_dim) |
| 91 | self.activ_2 = nn.ReLU() |
| 92 | self.linear_3 = nn.Linear(in_features=self.h2_dim, out_features=self.out_dim) |
| 93 | |
| 94 | def forward(self, x): |
| 95 | h1 = self.activ_1(self.linear_1(x)) |
nothing calls this directly
no test coverage detected