(self)
| 1031 | self._init_params() |
| 1032 | |
| 1033 | def _init_params(self): |
| 1034 | self.cell_fwd = LSTMCell( |
| 1035 | init=self.init, |
| 1036 | n_out=self.n_out, |
| 1037 | act_fn=self.act_fn, |
| 1038 | gate_fn=self.gate_fn, |
| 1039 | optimizer=self.optimizer, |
| 1040 | ) |
| 1041 | self.cell_bwd = LSTMCell( |
| 1042 | init=self.init, |
| 1043 | n_out=self.n_out, |
| 1044 | act_fn=self.act_fn, |
| 1045 | gate_fn=self.gate_fn, |
| 1046 | optimizer=self.optimizer, |
| 1047 | ) |
| 1048 | |
| 1049 | def forward(self, X): |
| 1050 | """ |