diff --git a/ncp/models/bbb.py b/ncp/models/bbb.py index 9489023..7f59e72 100644 --- a/ncp/models/bbb.py +++ b/ncp/models/bbb.py @@ -14,8 +14,9 @@ from tensorflow_probability import distributions as tfd import numpy as np -import tensorflow as tf import tensorflow_probability as tfp +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp import tools diff --git a/ncp/models/bbb_ncp.py b/ncp/models/bbb_ncp.py index e1c9df3..a7ca5a8 100644 --- a/ncp/models/bbb_ncp.py +++ b/ncp/models/bbb_ncp.py @@ -14,7 +14,8 @@ from tensorflow_probability import distributions as tfd import numpy as np -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() import tensorflow_probability as tfp from ncp import tools diff --git a/ncp/models/det.py b/ncp/models/det.py index 4ff30f4..f2513ca 100644 --- a/ncp/models/det.py +++ b/ncp/models/det.py @@ -13,7 +13,8 @@ # limitations under the License. from tensorflow_probability import distributions as tfd -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp import tools diff --git a/ncp/models/det_mix_ncp.py b/ncp/models/det_mix_ncp.py index 4169f46..6f57b93 100644 --- a/ncp/models/det_mix_ncp.py +++ b/ncp/models/det_mix_ncp.py @@ -13,7 +13,8 @@ # limitations under the License. from tensorflow_probability import distributions as tfd -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp import tools diff --git a/ncp/scripts/flights_active.py b/ncp/scripts/flights_active.py index 347a60a..0a1d254 100644 --- a/ncp/scripts/flights_active.py +++ b/ncp/scripts/flights_active.py @@ -21,7 +21,8 @@ mpl.use('Agg') import matplotlib.pyplot as plt import ruamel.yaml as yaml -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp import datasets from ncp import models diff --git a/ncp/scripts/toy_active.py b/ncp/scripts/toy_active.py index f4e596c..4b07cca 100644 --- a/ncp/scripts/toy_active.py +++ b/ncp/scripts/toy_active.py @@ -21,7 +21,8 @@ mpl.use('Agg') import matplotlib.pyplot as plt import ruamel.yaml as yaml -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp import datasets from ncp import models diff --git a/ncp/tools/training.py b/ncp/tools/training.py index 51c0645..9ff5e8c 100644 --- a/ncp/tools/training.py +++ b/ncp/tools/training.py @@ -18,7 +18,8 @@ import numpy as np import scipy.stats -import tensorflow as tf +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() from ncp.tools import attrdict from ncp.tools import plotting