(self, x)
| 265 | self.states = [K.zeros((input_shape[0], self.output_dim))] |
| 266 | |
| 267 | def preprocess_input(self, x): |
| 268 | if self.consume_less == 'cpu': |
| 269 | input_shape = self.input_spec[0].shape |
| 270 | input_dim = input_shape[2] |
| 271 | timesteps = input_shape[1] |
| 272 | return time_distributed_dense(x, self.W, self.b, self.dropout_W, |
| 273 | input_dim, self.output_dim, |
| 274 | timesteps) |
| 275 | else: |
| 276 | return x |
| 277 | |
| 278 | def step(self, x, states): |
| 279 | prev_output = states[0] |