MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / type

Method type

python/paddle/base/framework.py:2527–2548  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 15

is_tensor_array_typeFunction · 0.45
has_feed_operatorsFunction · 0.45
has_fetch_operatorsFunction · 0.45
_feed_dataMethod · 0.45
_run_implMethod · 0.45
_has_backward_opFunction · 0.45
__init__Method · 0.45
__init__Method · 0.45
typeMethod · 0.45
_sync_with_cppMethod · 0.45
typeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected