(self, dataset_ref, c_dim=256)
| 147 | output, (hn, cn) = rnn(input, (h0, c0)) |
| 148 | """ |
| 149 | def __init__(self, dataset_ref, c_dim=256): |
| 150 | |
| 151 | super(Simple_LSTM_Classifier, self).__init__() |
| 152 | |
| 153 | # --- Save the dims --- |
| 154 | self.in_dim = dataset_ref.get_input_dim() |
| 155 | self.out_dim = dataset_ref.get_output_dim() |
| 156 | self.c_dim = c_dim |
| 157 | |
| 158 | print(self.in_dim, self.out_dim, self.c_dim) |
| 159 | |
| 160 | # --- Layers --- |
| 161 | self.lstm = nn.LSTM(input_size=self.in_dim, hidden_size=self.c_dim) |
| 162 | self.output_projection = nn.Linear(in_features=self.c_dim, out_features=self.out_dim) |
| 163 | |
| 164 | def forward(self, x): |
| 165 | # --- x \in (N, L, H_dim) --- |
nothing calls this directly
no test coverage detected