Tests if a variable has been initialized. Args: variable: A `Variable`. Returns: Returns a scalar boolean Tensor, `True` if the variable has been initialized, `False` otherwise.
(variable)
| 3500 | @tf_export(v1=["is_variable_initialized"]) |
| 3501 | @tf_should_use.should_use_result |
| 3502 | def is_variable_initialized(variable): |
| 3503 | """Tests if a variable has been initialized. |
| 3504 | |
| 3505 | Args: |
| 3506 | variable: A `Variable`. |
| 3507 | |
| 3508 | Returns: |
| 3509 | Returns a scalar boolean Tensor, `True` if the variable has been |
| 3510 | initialized, `False` otherwise. |
| 3511 | """ |
| 3512 | return state_ops.is_variable_initialized(variable) |
| 3513 | |
| 3514 | |
| 3515 | @tf_export(v1=["assert_variables_initialized"]) |