Method
__init__
(self, hidden_size, bidirectional, num_layers)
Source from the content-addressed store, hash-verified
| 128 | class LSTMModel2(model.Model): |
| 129 | |
| 130 | def __init__(self, hidden_size, bidirectional, num_layers): |
| 131 | super(LSTMModel2, self).__init__() |
| 132 | self.lstm = layer.CudnnRNN(hidden_size=hidden_size, |
| 133 | num_layers=num_layers, |
| 134 | bidirectional=bidirectional, |
| 135 | return_sequences=False, |
| 136 | rnn_mode='lstm', |
| 137 | batch_first=True) |
| 138 | self.optimizer = opt.SGD(0.1) |
| 139 | |
| 140 | def forward(self, x): |
| 141 | return self.lstm(x) |
Callers
nothing calls this directly
Tested by
no test coverage detected