(flat_new_output, flat_new_state)
| 201 | return array_ops.where(copy_cond, output, new_output) |
| 202 | |
| 203 | def _copy_some_through(flat_new_output, flat_new_state): |
| 204 | # Use broadcasting select to determine which values should get |
| 205 | # the previous state & zero output, and which values should get |
| 206 | # a calculated state & output. |
| 207 | flat_new_output = [ |
| 208 | _copy_one_through(zero_output, new_output) |
| 209 | for zero_output, new_output in zip(flat_zero_output, flat_new_output)] |
| 210 | flat_new_state = [ |
| 211 | _copy_one_through(state, new_state) |
| 212 | for state, new_state in zip(flat_state, flat_new_state)] |
| 213 | return flat_new_output + flat_new_state |
| 214 | |
| 215 | def _maybe_copy_some_through(): |
| 216 | """Run RNN step. Pass through either no or some past state.""" |
no test coverage detected