If some operations in _apply method depend only on the input, not on recurrent states, they could be computed in advance. model: ModelHelper object new operators would be added to input_blob: either the whole input sequence with shape (sequence_length, batc
(self, model, input_blob)
| 211 | raise NotImplementedError('Abstract method') |
| 212 | |
| 213 | def prepare_input(self, model, input_blob): |
| 214 | ''' |
| 215 | If some operations in _apply method depend only on the input, |
| 216 | not on recurrent states, they could be computed in advance. |
| 217 | |
| 218 | model: ModelHelper object new operators would be added to |
| 219 | |
| 220 | input_blob: either the whole input sequence with shape |
| 221 | (sequence_length, batch_size, input_dim) or a single input with shape |
| 222 | (1, batch_size, input_dim). |
| 223 | ''' |
| 224 | return input_blob |
| 225 | |
| 226 | def get_output_state_index(self): |
| 227 | ''' |
no outgoing calls
no test coverage detected