parameters: ()
docstring: Enables TensorFlow 2.x behaviors.
  
    This function can be called at the beginning of the program (before `Tensors`,
    `Graphs` or other structures have been created, and before devices have been
    initialized. It switches all global behaviors that are different between
    TensorFlow 1.x and 2.x to behave as intended for 2.x.
  
    This function is called in the main TensorFlow `__init__.py` file, user should
    not need to call it, except during complex migrations.
docstring_summary: Enables TensorFlow 2.x behaviors.
docstring_tokens: Enables TensorFlow 2 . x behaviors .
function: def enable_v2_behavior():
    """Enables TensorFlow 2.x behaviors.
  
    This function can be called at the beginning of the program (before `Tensors`,
    `Graphs` or other structures have been created, and before devices have been
    initialized. It switches all global behaviors that are different between
    TensorFlow 1.x and 2.x to behave as intended for 2.x.
  
    This function is called in the main TensorFlow `__init__.py` file, user should
    not need to call it, except during complex migrations.
    """
    # TF2 behavior is enabled if either 1) enable_v2_behavior() is called or
    # 2) the TF2_BEHAVIOR=1 environment variable is set.  In the latter case,
    # the modules below independently check if tf2.enabled().
    tf2.enable()
    ops.enable_eager_execution()
    tensor_shape.enable_v2_tensorshape()  # Also switched by tf2
    variable_scope.enable_resource_variables()
    ops.enable_tensor_equality()
    # Enables TensorArrayV2 and control flow V2.
    control_flow_v2_toggles.enable_control_flow_v2()
function_tokens: def enable_v2_behavior ( ) : # TF2 behavior is enabled if either 1) enable_v2_behavior() is called or # 2) the TF2_BEHAVIOR=1 environment variable is set.  In the latter case, # the modules below independently check if tf2.enabled(). tf2 . enable ( ) ops . enable_eager_execution ( ) tensor_shape . enable_v2_tensorshape ( ) # Also switched by tf2 variable_scope . enable_resource_variables ( ) ops . enable_tensor_equality ( ) # Enables TensorArrayV2 and control flow V2. control_flow_v2_toggles . enable_control_flow_v2 ( )