Indicating Type of current Variable **Notes: This is a read-only property** Examples: .. code-block:: pycon >>> # doctest: +SKIP("This has diff in xdoctest env") >>> import paddle.base as base >>> cur_program = b
(self)
| 2525 | |
| 2526 | @property |
| 2527 | def type(self): |
| 2528 | """ |
| 2529 | Indicating Type of current Variable |
| 2530 | |
| 2531 | **Notes: This is a read-only property** |
| 2532 | |
| 2533 | Examples: |
| 2534 | .. code-block:: pycon |
| 2535 | |
| 2536 | >>> # doctest: +SKIP("This has diff in xdoctest env") |
| 2537 | >>> import paddle.base as base |
| 2538 | >>> cur_program = base.Program() |
| 2539 | >>> cur_block = cur_program.current_block() |
| 2540 | >>> new_variable = cur_block.create_var( |
| 2541 | ... name="X", |
| 2542 | ... shape=[-1, 23, 48], |
| 2543 | ... dtype="float32", |
| 2544 | ... ) |
| 2545 | >>> print("Type of current Var is: {}".format(new_variable.type)) |
| 2546 | Type of current Var is: VarType.DENSE_TENSOR |
| 2547 | """ |
| 2548 | return self.desc.type() |
| 2549 | |
| 2550 | @property |
| 2551 | def T(self): |
no outgoing calls
no test coverage detected