tf.compat.v1.disable_v2_behavior | TensorFlow v2.16.1 (original) (raw)
tf.compat.v1.disable_v2_behavior
Stay organized with collections Save and categorize content based on your preferences.
Disables TensorFlow 2.x behaviors.
tf.compat.v1.disable_v2_behavior()
Migrate to TF2
Using this function indicates that your software is not compatible with eager execution and tf.function in TF2.
To migrate to TF2, rewrite your code to be compatible with eager execution. Please refer to the migration guide for additional resource on the topic.
Description
Used in the notebooks
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 1.x.
User can call this function to disable 2.x behavior during complex migrations.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.