(input_t)
| 3783 | """ |
| 3784 | |
| 3785 | def swap_batch_timestep(input_t): |
| 3786 | # Swap the batch and timestep dim for the incoming tensor. |
| 3787 | axes = list(range(len(input_t.shape))) |
| 3788 | axes[0], axes[1] = 1, 0 |
| 3789 | return array_ops.transpose(input_t, axes) |
| 3790 | |
| 3791 | if not time_major: |
| 3792 | inputs = nest.map_structure(swap_batch_timestep, inputs) |