(dtype)
| 886 | return paddle.transpose(x, [1, 0, *list(range(2, len(x.shape)))]) |
| 887 | |
| 888 | def _create_array_out_of_while(dtype): |
| 889 | current_block_idx = default_main_program().current_block_idx |
| 890 | default_main_program().current_block_idx = ( |
| 891 | default_main_program().current_block().parent_idx |
| 892 | ) |
| 893 | tensor_array = paddle.tensor.array.create_array(dtype) |
| 894 | default_main_program().current_block_idx = current_block_idx |
| 895 | return tensor_array |
| 896 | |
| 897 | # While |
| 898 | with while_op.block(): |
no test coverage detected