Indicating if current Variable is a Parameter Examples: .. code-block:: pycon >>> import paddle >>> paddle.enable_static() >>> new_parameter = paddle.static.create_parameter( ... name="X",
(self)
| 2368 | |
| 2369 | @property |
| 2370 | def is_parameter(self): |
| 2371 | """ |
| 2372 | Indicating if current Variable is a Parameter |
| 2373 | |
| 2374 | Examples: |
| 2375 | .. code-block:: pycon |
| 2376 | |
| 2377 | >>> import paddle |
| 2378 | >>> paddle.enable_static() |
| 2379 | >>> new_parameter = paddle.static.create_parameter( |
| 2380 | ... name="X", |
| 2381 | ... shape=[10, 23, 48], |
| 2382 | ... dtype="float32", |
| 2383 | ... ) |
| 2384 | >>> if new_parameter.is_parameter: |
| 2385 | ... print("Current var is a Parameter") |
| 2386 | ... else: |
| 2387 | ... print("Current var is not a Parameter") |
| 2388 | Current var is a Parameter |
| 2389 | """ |
| 2390 | return self.desc.is_parameter() |
| 2391 | |
| 2392 | @is_parameter.setter |
| 2393 | def is_parameter(self, p): |
nothing calls this directly
no test coverage detected