(flat_new_output, flat_new_state)
| 244 | return array_ops.where(copy_cond, output, new_output) |
| 245 | |
| 246 | def _copy_some_through(flat_new_output, flat_new_state): |
| 247 | # Use broadcasting select to determine which values should get |
| 248 | # the previous state & zero output, and which values should get |
| 249 | # a calculated state & output. |
| 250 | flat_new_output = [ |
| 251 | _copy_one_through(zero_output, new_output) |
| 252 | for zero_output, new_output in zip(flat_zero_output, flat_new_output) |
| 253 | ] |
| 254 | flat_new_state = [ |
| 255 | _copy_one_through(state, new_state) |
| 256 | for state, new_state in zip(flat_state, flat_new_state) |
| 257 | ] |
| 258 | return flat_new_output + flat_new_state |
| 259 | |
| 260 | def _maybe_copy_some_through(): |
| 261 | """Run RNN step. Pass through either no or some past state.""" |
no test coverage detected