Indicating if we current Variable should be long-term alive **Notes: This Property will be deprecated and this API is just to help user understand concept** **1. All Variable's persistable is** ``False`` **except Parameters.** **2. In** Dygraph **mode, th
(self)
| 2336 | |
| 2337 | @property |
| 2338 | def persistable(self): |
| 2339 | """ |
| 2340 | Indicating if we current Variable should be long-term alive |
| 2341 | |
| 2342 | |
| 2343 | **Notes: This Property will be deprecated and this API is just to help user understand concept** |
| 2344 | |
| 2345 | **1. All Variable's persistable is** ``False`` **except Parameters.** |
| 2346 | |
| 2347 | **2. In** Dygraph **mode, this property should not be changed** |
| 2348 | |
| 2349 | Examples: |
| 2350 | .. code-block:: pycon |
| 2351 | |
| 2352 | >>> import paddle.base as base |
| 2353 | >>> cur_program = base.Program() |
| 2354 | >>> cur_block = cur_program.current_block() |
| 2355 | >>> new_variable = cur_block.create_var( |
| 2356 | ... name="X", |
| 2357 | ... shape=[-1, 23, 48], |
| 2358 | ... dtype="float32", |
| 2359 | ... ) |
| 2360 | >>> print("persistable of current Var is: {}".format(new_variable.persistable)) |
| 2361 | persistable of current Var is: False |
| 2362 | """ |
| 2363 | return self.desc.persistable() |
| 2364 | |
| 2365 | @persistable.setter |
| 2366 | def persistable(self, p): |
no outgoing calls
no test coverage detected